mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2026-10-05 02:26:55 +00:00
BETTERZON-141: Fixing user updating query
This commit is contained in:
1 parent
f2adb1e375
commit
daef6ec208
1 file changed
+2
-2
@@ -115,8 +115,8 @@ export const login = async (username: string, password: string, ip: string): Pro
|
||||
const sessionKeyHash = bcrypt.hashSync(sessionKey, 10);
|
||||
|
||||
// Update user entry in SQL
|
||||
const userQuery = 'UPDATE users SET last_login_date = NOW()';
|
||||
const userIdRes = await conn.query(userQuery);
|
||||
const userQuery = 'UPDATE users SET last_login_date = NOW() WHERE user_id = ?';
|
||||
const userIdRes = await conn.query(userQuery, userId);
|
||||
await conn.commit();
|
||||
|
||||
// Create session
|
||||
|
||||
Reference in new issue
Block a user