mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2024-12-22 19:55:12 +00:00
BETTERZON-141: Fixing user updating query
This commit is contained in:
parent
f2adb1e375
commit
daef6ec208
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user