personal_website/routes/api/mediaRouter.ts
2024-07-17 02:19:16 +02:00

13 lines
427 B
TypeScript

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