Update
This commit is contained in:
parent
4138c22051
commit
e17adfcfa5
11 changed files with 193 additions and 83 deletions
|
|
@ -3,22 +3,22 @@ module.exports = app => {
|
|||
let router = require("express").Router();
|
||||
|
||||
// Create a new Playlist
|
||||
router.post("/user/playlist", playlists.create);
|
||||
router.post("/playlist/create", playlists.create);
|
||||
|
||||
// Retrieve all Playlists
|
||||
router.get("/user/playlists", playlists.findAll);
|
||||
router.get("/playlist/findAll", playlists.findAll);
|
||||
|
||||
// Retrieve a single Playlist with id
|
||||
router.get("/user/playlist/:id", playlists.findOne);
|
||||
router.get("/playlist/findOne/:id", playlists.findOne);
|
||||
|
||||
// Update a Playlist with id
|
||||
router.put("/user/playlist/:id", playlists.update);
|
||||
router.put("/playlist/update/:id", playlists.update);
|
||||
|
||||
// Delete a Playlist with id
|
||||
router.delete("/user/playlist/:id", playlists.delete);
|
||||
router.delete("/playlist/delete/:id", playlists.delete);
|
||||
|
||||
// Delete all Playlists
|
||||
router.delete("/user/playlists", playlists.deleteAll);
|
||||
router.delete("/playlist/deleteAll", playlists.deleteAll);
|
||||
|
||||
app.use('/api', router);
|
||||
};
|
||||
|
|
|
|||
Reference in a new issue