1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
This commit is contained in:
sjaanus 2024-08-28 16:22:41 +03:00
parent 7bcaf37e78
commit 190fb616bc
No known key found for this signature in database
GPG Key ID: 20E007C0248BA7FF
2 changed files with 7 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import type {
IUserUpdateFields,
} from '../types/stores/user-store';
import type { Db } from './db';
import type FlagResolver from '../util/flag-resolver';
const TABLE = 'users';
const PASSWORD_HASH_TABLE = 'used_passwords';
@ -71,9 +72,12 @@ class UserStore implements IUserStore {
private logger: Logger;
constructor(db: Db, getLogger: LogProvider) {
private flagResolver: FlagResolver;
constructor(db: Db, getLogger: LogProvider, flagResolver: FlagResolver) {
this.db = db;
this.logger = getLogger('user-store.ts');
this.flagResolver = flagResolver;
}
async getPasswordsPreviouslyUsed(userId: number): Promise<string[]> {

View File

@ -62,6 +62,8 @@ export default class User implements IUser {
seenAt?: Date;
firstSeenAt?: Date;
loginAttempts?: number;
createdAt?: Date;