Linted all middleware.

This commit is contained in:
2018-02-07 13:52:08 +01:00
parent 34982c14fe
commit 58449fc753
2 changed files with 18 additions and 17 deletions

View File

@@ -1,10 +1,10 @@
const mustBeAuthenticated = (req, res, next) => {
if (req.loggedInUser === undefined) {
return res.status(401).send({
success: false,
error: 'You must be logged in.',
}); }
});
}
return next();
};

View File

@@ -1,5 +1,6 @@
/* eslint-disable no-param-reassign */
const configuration = require('src/config/configuration').getInstance();
const secret = configuration.get('authentication', 'secret');
const Token = require('src/user/token');