Add playlist, video and ad skeleton

This commit is contained in:
Yûki VACHOT 2021-10-30 03:10:15 +02:00
parent e87c4bb146
commit 5f73ec72bc
20 changed files with 414 additions and 65 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);
}
};