Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 27 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | const express = require('express'); |
||
2 | const path = require("path"); |
||
3 | const router = express.Router(); |
||
4 | |||
5 | const authModel = require("./models/auth.js"); |
||
6 | |||
7 | const auth = require("./route/auth.js"); |
||
8 | const copier = require("./route/copier.js"); |
||
9 | const deliveries = require("./route/deliveries.js"); |
||
10 | const invoices = require("./route/invoices.js"); |
||
11 | const orderItems = require("./route/order_items.js"); |
||
12 | const orders = require("./route/orders.js"); |
||
13 | const products = require("./route/products.js"); |
||
14 | |||
15 | router.all('*', authModel.checkAPIKey); |
||
16 | |||
17 | router.get('/', (req, res) => res.sendFile(path.join(__dirname + '/documentation.html'))); |
||
|
|||
18 | |||
19 | router.use("/auth", auth); |
||
20 | router.use("/copier", copier); |
||
21 | router.use("/deliveries", deliveries); |
||
22 | router.use("/invoices", invoices); |
||
23 | router.use("/order_items", orderItems); |
||
24 | router.use("/orders", orders); |
||
25 | router.use("/products", products); |
||
26 | |||
27 | module.exports = router; |
||
28 |