-
Notifications
You must be signed in to change notification settings - Fork 0
/
modules.js
60 lines (54 loc) · 2.54 KB
/
modules.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//Film modules
//Add
const addFilm = require('./helpers/films/addFilm');
exports.addFilm = addFilm.addFilm;
//Delete
const deleteFilm = require('./helpers/films/deleteFilm');
exports.deleteFilm = deleteFilm.deleteFilm;
exports.deleteFilmDirector = deleteFilm.deleteFilmDirector;
exports.deleteFilmGenre = deleteFilm.deleteFilmGenre;
exports.deleteFilmLength = deleteFilm.deleteFilmLength;
exports.deleteFilmLessLength = deleteFilm.deleteFilmLessLength;
exports.deleteFilmGreaterLength = deleteFilm.deleteFilmGreaterLength;
exports.deleteFilmTitle = deleteFilm.deleteFilmTitle;
exports.deleteFilmYear = deleteFilm.deleteFilmYear;
exports.deleteFilmLessYear = deleteFilm.deleteFilmLessYear;
exports.deleteFilmGreaterYear = deleteFilm.deleteFilmGreaterYear;
//Get
const getFilm = require('./helpers/films/getFilm');
exports.getFilm = getFilm.getFilm;
exports.getFilmDirector = getFilm.getFilmDirector;
exports.getFilmGenre = getFilm.getFilmGenre;
exports.getFilmLength = getFilm.getFilmLength;
exports.getFilmLessLength = getFilm.getFilmLessLength;
exports.getFilmGreaterLength = getFilm.getFilmGreaterLength;
exports.getFilmYear = getFilm.getFilmYear;
exports.getFilmLessYear = getFilm.getFilmLessYear;
exports.getFilmGreaterYear = getFilm.getFilmGreaterYear;
exports.getFilmTitle = getFilm.getFilmTitle;
//Modify
const modifyFilm = require('./helpers/films/modifyFilm');
exports.modifyFilm = modifyFilm.modifyFilm;
//DB modules
const dbHandler = require('./models/dbHandler');
exports.connectDB = dbHandler.connectDB;
exports.disconnectDB = dbHandler.disconnectDB;
exports.createDB = dbHandler.createDB;
exports.getDB = dbHandler.getDB;
exports.getDBContent = dbHandler.getDBContent;
exports.createFilmDocument = dbHandler.createFilmDocument;
exports.findFilmDocument = dbHandler.findFilmDocument;
exports.deleteFilmDocumentByID = dbHandler.deleteFilmDocumentByID;
exports.deleteFilmDocument = dbHandler.deleteFilmDocument;
exports.updateFilmDocument = dbHandler.updateFilmDocument;
exports.getConnection = dbHandler.getConnection;
//Check film
const checkFilm = require('./middlewares/checkFilm');
exports.checkExistsFilm = checkFilm.checkExistsFilm;
//HTTP modules
const httpHandler = require('./middlewares/httpHandler');
exports.getResponse = httpHandler.getResponse;
exports.errorResponse = httpHandler.errorResponse;
exports.deleteResponse = httpHandler.deleteResponse;
exports.postResponse = httpHandler.postResponse;
exports.putResponse = httpHandler.putResponse;