Add playlist, video and ad skeleton
This commit is contained in:
parent
e87c4bb146
commit
5f73ec72bc
20 changed files with 414 additions and 65 deletions
24
backend/app/routes/playlist.routes.js
Normal file
24
backend/app/routes/playlist.routes.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
const playlists = require("../controllers/playlist.controller");
|
||||
module.exports = app => {
|
||||
let router = require("express").Router();
|
||||
|
||||
// Create a new Playlist
|
||||
router.post("/user/playlist", playlists.create);
|
||||
|
||||
// Retrieve all Playlists
|
||||
router.get("/user/playlists", playlists.findAll);
|
||||
|
||||
// Retrieve a single Playlist with id
|
||||
router.get("/user/playlist/:id", playlists.findOne);
|
||||
|
||||
// Update a Playlist with id
|
||||
router.put("/user/playlist/:id", playlists.update);
|
||||
|
||||
// Delete a Playlist with id
|
||||
router.delete("/user/playlist/:id", playlists.delete);
|
||||
|
||||
// Delete all Playlists
|
||||
router.delete("/user/playlists", playlists.deleteAll);
|
||||
|
||||
app.use('/api', router);
|
||||
};
|
||||
Reference in a new issue