diff options
| author | Pitu <[email protected]> | 2018-09-17 04:55:42 -0300 |
|---|---|---|
| committer | Pitu <[email protected]> | 2018-09-17 04:55:42 -0300 |
| commit | f2c885b718528d42df412e612520fb471c46d0bd (patch) | |
| tree | 8841d063055b6a3ce9abdbd1e3482d8557996f4f /src/api/structures/Route.js | |
| parent | Changes (diff) | |
| download | host.fuwn.me-f2c885b718528d42df412e612520fb471c46d0bd.tar.xz host.fuwn.me-f2c885b718528d42df412e612520fb471c46d0bd.zip | |
Commented all the code
Diffstat (limited to 'src/api/structures/Route.js')
| -rw-r--r-- | src/api/structures/Route.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/structures/Route.js b/src/api/structures/Route.js index 77ebd32..9ff65f0 100644 --- a/src/api/structures/Route.js +++ b/src/api/structures/Route.js @@ -2,6 +2,7 @@ const JWT = require('jsonwebtoken'); const { server } = require('../../../config'); const db = require('knex')(server.database); const moment = require('moment'); +const log = require('../utils/Log'); class Route { constructor(path, method, options) { @@ -21,7 +22,7 @@ class Route { return JWT.verify(token, server.secret, async (error, decoded) => { if (error) { - console.log(error); + log.error(error); return res.status(401).json({ message: 'Your token appears to be invalid' }); } const id = decoded ? decoded.sub : ''; |