personal_website/routes/api/mediaRouter.ts
2024-07-16 15:02:41 +02:00

13 lines
395 B
TypeScript

import express from "express";
import mediaController from '../../controllers/mediaController.js';
import checkAuthenticated from '../../miscellaneous/checkAuthenticated';
var router = express.Router();
router.get('/', mediaController.list);
router.post('/', checkAuthenticated, mediaController.create);
router.delete('/', checkAuthenticated, mediaController.remove);
export default router;