personal_website/routes/api/mediaRouter.js
2023-10-04 20:16:47 +02:00

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;