Add playlist, video and ad skeleton

This commit is contained in:
Yûki VACHOT 2021-10-30 03:10:15 +02:00
parent e87c4bb146
commit 5f73ec72bc
20 changed files with 414 additions and 65 deletions

View file

@ -0,0 +1,27 @@
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);
};