idk what this commit is but it shouldnt break things lol

This commit is contained in:
Expand-sys 2021-07-02 09:13:55 +10:00
parent a171fa2368
commit b5ee1e6535

View file

@ -267,11 +267,8 @@ fastify.post("/login", async function (req, res) {
}
const { name, password } = req.body;
let adminTest;
let verified;
try {
adminTest = await client.adminVerifyPassword(password);
verified = await client.verifyPassword(name, password);
} catch (err) {
console.log(err);
}
@ -283,6 +280,8 @@ fastify.post("/login", async function (req, res) {
req.session.set("password", password);
res.redirect("/BankF");
} else {
let verified;
verified = await client.verifyPassword(name, password);
console.log(verified);
if (verified == 1) {
req.session.set("user", name);