format project
This commit is contained in:
parent
90d8e39eb3
commit
c02cf8c12e
39 changed files with 2062 additions and 909 deletions
|
|
@ -1,10 +1,10 @@
|
|||
const sessionService = require('../services/sessionService');
|
||||
|
||||
async function redirectIfNotAuthorizedMiddleware(req, res, next) {
|
||||
if (!(await sessionService.isSessionAuthorized(req.cookies.sessionUuid))) {
|
||||
res.redirect('/');
|
||||
}
|
||||
next();
|
||||
if (!(await sessionService.isSessionAuthorized(req.cookies.sessionUuid))) {
|
||||
res.redirect('/');
|
||||
}
|
||||
next();
|
||||
}
|
||||
|
||||
module.exports = redirectIfNotAuthorizedMiddleware;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue