This commit is contained in:
Yûki VACHOT 2021-11-12 14:25:10 +01:00
parent b92456d8d3
commit b6130a7268
29 changed files with 16 additions and 779 deletions

View file

@ -0,0 +1,52 @@
const db = require("../models/mongodb.model");
const {sendError, sendMessage} = require ("../config/response.config");
const {checkLogin} = require("../config/sessionJWT.config");
const Playlist = db.playlists;
// Create a new Playlist
exports.create = (req, res) => {
const token = checkLogin(req, res);
if(token){
return sendError(res, 501, -1, "Playlist.create not Implemented", token);
}
};
// Retrieve all Playlists
exports.findAll = (req, res) => {
const token = checkLogin(req, res);
if(token){
return sendError(res, 501, -1, "Playlist.findAll not Implemented", token);
}
};
// Retrieve a single Playlist with id
exports.findOne = (req, res) => {
const token = checkLogin(req, res);
if(token){
return sendError(res, 501, -1, "Playlist.findOne not Implemented", token);
}
};
// Update a Playlist with id
exports.update = (req, res) => {
const token = checkLogin(req, res);
if(token){
return sendError(res, 501, -1, "Playlist.update not Implemented", token);
}
};
// Delete a Playlist with id
exports.delete = (req, res) => {
const token = checkLogin(req, res);
if(token){
return sendError(res, 501, -1, "Playlist.delete not Implemented", token);
}
};
// Delete all Playlists
exports.deleteAll = (req, res) => {
const token = checkLogin(req, res);
if(token){
return sendError(res, 501, -1, "Playlist.deleteAll not Implemented", token);
}
};