personal_website/routes/api/mediaRouter.js
2024-07-16 14:24:01 +02:00

12 lines
427 B
JavaScript

var express = require('express');
var router = express.Router();
var mediaController = require('../../controllers/mediaController.js');
var checkAuthenticated = require('../../miscellaneous/checkAuthenticated.js').default;
router.get('/', mediaController.list);
router.post('/', checkAuthenticated, mediaController.create);
router.delete('/', checkAuthenticated, mediaController.remove);
module.exports = router;