redirect now working properly
This commit is contained in:
parent
f57a20a3a3
commit
2e79a1fadd
1 changed files with 1 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ const sessionService = require('../services/sessionService');
|
||||||
|
|
||||||
async function redirectIfNotAuthorizedMiddleware(req, res, next) {
|
async function redirectIfNotAuthorizedMiddleware(req, res, next) {
|
||||||
if (!(await sessionService.isSessionAuthorized(req.cookies.sessionUuid))) {
|
if (!(await sessionService.isSessionAuthorized(req.cookies.sessionUuid))) {
|
||||||
res.redirect('/');
|
return res.redirect('/');
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue