This repository has been archived on 2026-05-01. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
PolyNotFound/backend/app/routes/video.routes.js

27 lines
651 B
JavaScript

const videos = require("../controllers/video.controller");
module.exports = app => {
let router = require("express").Router();
// Search Video
router.post("/videos", videos.search);
// Create a new Video
router.post("/video", videos.create);
// Retrieve all Videos
router.get("/videos", videos.findAll);
// Retrieve a single Video with id
router.get("/video/:id", videos.findOne);
// Update a Video with id
router.put("/video/:id", videos.update);
// Delete a Video with id
router.delete("/video/:id", videos.delete);
// Delete all Videos
router.delete("/videos", videos.deleteAll);
app.use('/api', router);
};