mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-18 07:32:14 +11:00
idk what this commit is but it shouldnt break things lol
This commit is contained in:
parent
a171fa2368
commit
b5ee1e6535
1 changed files with 2 additions and 3 deletions
5
index.js
5
index.js
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue