Update
This commit is contained in:
parent
b92456d8d3
commit
b6130a7268
29 changed files with 16 additions and 779 deletions
68
app/controllers/video.controller.js
Normal file
68
app/controllers/video.controller.js
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
const db = require("../models/mongodb.model");
|
||||
const {sendError, sendMessage} = require ("../config/response.config");
|
||||
const {checkLogin} = require("../config/sessionJWT.config");
|
||||
const Video = db.video;
|
||||
|
||||
// Search Video
|
||||
exports.search = (req, res) => {
|
||||
const token = checkLogin(req, res);
|
||||
if(token){
|
||||
return sendError(res, 501, -1, "Video.search not Implemented", token);
|
||||
}
|
||||
};
|
||||
|
||||
// History
|
||||
exports.history = (req, res) => {
|
||||
const token = checkLogin(req, res);
|
||||
if(token){
|
||||
return sendError(res, 501, -1, "Video.search not Implemented", token);
|
||||
}
|
||||
};
|
||||
|
||||
// Create a new Video
|
||||
exports.create = (req, res) => {
|
||||
const token = checkLogin(req, res);
|
||||
if(token){
|
||||
return sendError(res, 501, -1, "Video.create not Implemented", token);
|
||||
}
|
||||
};
|
||||
|
||||
// Retrieve all Videos
|
||||
exports.findAll = (req, res) => {
|
||||
const token = checkLogin(req, res);
|
||||
if(token){
|
||||
return sendError(res, 501, -1, "Video.findAll not Implemented", token);
|
||||
}
|
||||
};
|
||||
|
||||
// Retrieve a single Video with id
|
||||
exports.findOne = (req, res) => {
|
||||
const token = checkLogin(req, res);
|
||||
if(token){
|
||||
return sendError(res, 501, -1, "Video.findOne not Implemented", token);
|
||||
}
|
||||
};
|
||||
|
||||
// Update a Video with id
|
||||
exports.update = (req, res) => {
|
||||
const token = checkLogin(req, res);
|
||||
if(token){
|
||||
return sendError(res, 501, -1, "Video.update not Implemented", token);
|
||||
}
|
||||
};
|
||||
|
||||
// Delete a Video with id
|
||||
exports.delete = (req, res) => {
|
||||
const token = checkLogin(req, res);
|
||||
if(token){
|
||||
return sendError(res, 501, -1, "Video.delete not Implemented", token);
|
||||
}
|
||||
};
|
||||
|
||||
// Delete all Videos
|
||||
exports.deleteAll = (req, res) => {
|
||||
const token = checkLogin(req, res);
|
||||
if(token){
|
||||
return sendError(res, 501, -1, "Video.deleteAll not Implemented", token);
|
||||
}
|
||||
};
|
||||
Reference in a new issue