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

13 lines
397 B
TypeScript

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