mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2024-11-22 14:23:57 +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);
|
const sessionKeyHash = bcrypt.hashSync(sessionKey, 10);
|
||||||
|
|
||||||
// Update user entry in SQL
|
// Update user entry in SQL
|
||||||
const userQuery = 'UPDATE users SET last_login_date = NOW()';
|
const userQuery = 'UPDATE users SET last_login_date = NOW() WHERE user_id = ?';
|
||||||
const userIdRes = await conn.query(userQuery);
|
const userIdRes = await conn.query(userQuery, userId);
|
||||||
await conn.commit();
|
await conn.commit();
|
||||||
|
|
||||||
// Create session
|
// Create session
|
||||||
|
|
Loading…
Reference in New Issue
Block a user