12 lines
416 B
JavaScript
12 lines
416 B
JavaScript
var express = require('express');
|
|
var router = express.Router();
|
|
var mediaController = require('../../controllers/mediaController.js');
|
|
var checkAuthenticated = require('../../middleware/checkAuthenticated.js');
|
|
|
|
router.get('/', mediaController.list);
|
|
|
|
router.post('/', checkAuthenticated, mediaController.create);
|
|
|
|
router.delete('/', checkAuthenticated, mediaController.remove);
|
|
|
|
module.exports = router; |