Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 36 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import express from "express"; |
||
2 | // import some model from some file |
||
3 | |||
4 | const router = express.Router(); |
||
5 | |||
6 | /** |
||
7 | * @description Route for transactions for one user |
||
8 | * |
||
9 | * @param {express.Request} req Request object |
||
10 | * @param {express.Response} res Response object |
||
11 | * @param {express.NextFunction} next Next function |
||
12 | * |
||
13 | * @returns {void} |
||
14 | */ |
||
15 | router.get("/", (req, res, next) => { |
||
16 | // code here for getting transactions for one user |
||
17 | // Båda admin och användare använder den här routen |
||
18 | // user_id finns antingen i token eller body (admin) |
||
19 | }); |
||
20 | |||
21 | /** |
||
22 | * @description Route for transactions for one user using pagination |
||
23 | * |
||
24 | * @param {express.Request} req Request object |
||
25 | * @param {express.Response} res Response object |
||
26 | * @param {express.NextFunction} next Next function |
||
27 | * |
||
28 | * @returns {void} |
||
29 | */ |
||
30 | router.get("/limit/:limit/offset/:offset", (req, res, next) => { |
||
31 | // code here for getting transactions for one user using pagination |
||
32 | // Båda admin och användare använder den här routen |
||
33 | // user_id finns antingen i token eller body (admin) |
||
34 | }); |
||
35 | |||
36 | export default router; |
||
37 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.