-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
22 lines (17 loc) · 836 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const express = require('express');
const getRoute = require('./helpers/routes_middleware_validations/getRoute');
const getByIdRoute = require('./helpers/routes_middleware_validations/getByIdRoute');
const deleteRoute = require('./helpers/routes_middleware_validations/deleteRoute');
const postRoute = require('./helpers/routes_middleware_validations/postRoute');
const putRoute = require('./helpers/routes_middleware_validations/putRoute');
function createRoutes(options) {
const router = express.Router();
const mininumCallbacksQty = 1;
getRoute(options, router);
getByIdRoute(options, router, mininumCallbacksQty);
deleteRoute(options, router, mininumCallbacksQty);
postRoute(options, router, mininumCallbacksQty);
putRoute(options, router, mininumCallbacksQty);
return router;
}
module.exports = createRoutes;