1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-19 00:15:43 +01:00
This commit is contained in:
sjaanus 2024-08-28 16:19:31 +03:00
parent c16bcbd6c5
commit 7bcaf37e78
No known key found for this signature in database
GPG Key ID: 20E007C0248BA7FF

View File

@ -232,11 +232,12 @@ class UserStore implements IUserStore {
} }
async successfullyLogin(user: User): Promise<void> { async successfullyLogin(user: User): Promise<void> {
const currentDate = new Date();
return this.buildSelectUser(user).update({ return this.buildSelectUser(user).update({
login_attempts: 0, login_attempts: 0,
seen_at: new Date(), seen_at: currentDate,
first_seen_at: this.db.raw('COALESCE(first_seen_at, ?)', [ first_seen_at: this.db.raw('COALESCE(first_seen_at, ?)', [
new Date(), currentDate,
]), ]),
}); });
} }