From 988d90b46f55830bc6a7fed80ed9d71e30fb26af Mon Sep 17 00:00:00 2001 From: Mystikfluu Date: Thu, 25 Aug 2022 12:14:09 +0200 Subject: [PATCH] fix a bug when user wasn't logged in --- routes/api/all.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/routes/api/all.js b/routes/api/all.js index 8b02e51..a087bd1 100644 --- a/routes/api/all.js +++ b/routes/api/all.js @@ -11,7 +11,10 @@ export const setup = function (router, con, server) { let unsigned; if (req.body.user == undefined || req.body.pass == undefined) { unsigned = unsign.getunsigned(req, res); - if (!unsigned)next() + if (!unsigned){ + next() + return + } } else { unsigned = `${req.body.user} ${SHA.SHA256(req.body.pass, req.body.user, HASHES_COOKIE)}`;