History added + User tested

This commit is contained in:
Yûki VACHOT 2021-11-02 04:37:22 +01:00
parent f774cf64bd
commit 4629b42b36
8 changed files with 197 additions and 107 deletions

View file

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