Test Failed
Push — master ( 853a48...344ee9 )
by Emil
02:45
created

v2/index.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 27
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
eloc 21
nc 1
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 1
mnd 0
bc 0
fnc 1
bpm 0
cpm 1
noi 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A index.js ➔ ??? 0 1 1
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')));
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
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