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/playlist.routes.js

24 lines
681 B
JavaScript

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);
};