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