Linted all middleware.
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user