fix account save
ci / docker_image (push) Successful in 2m17s
ci / deploy (push) Successful in 50s

This commit is contained in:
2026-04-11 09:28:45 -05:00
parent e6e4b068c9
commit bce9a19776
3 changed files with 14 additions and 8 deletions
+3
View File
@@ -64,8 +64,10 @@ export async function login(email: string, password: string): Promise<User> {
SELECT * FROM users
WHERE email = ${email};
`;
console.log('1.25: ' + Date.now());
if (user) {
if (await bcrypt.compare(password, user.passwordHash!)) {
console.log('1.5: ' + Date.now());
delete user.passwordHash;
await sql`
@@ -73,6 +75,7 @@ export async function login(email: string, password: string): Promise<User> {
SET last_sign_in = NOW()
WHERE id = ${user.id};
`;
console.log('1.75: ' + Date.now());
return user;
}