website/middleware/admin-authentication.js
RedDuckss 26058d8fa9 Added linting
Added the linter ESLint, added a custom set of rules and fixed linting issues
2018-10-11 04:09:13 -04:00

11 lines
248 B
JavaScript

const common = require('../helpers/common');
function adminUserAuthenticationMiddleware(req, res, next) {
if (req.isAuthenticated()) {
return next();
}
common.sendApiAuthError(req, res);
}
module.exports = adminUserAuthenticationMiddleware;