refactor: change password repository lookup (#19584)

This commit is contained in:
Jason Rasmussen
2025-06-27 16:52:04 -04:00
committed by GitHub
parent a2a9797fab
commit 09cbc5d3f4
4 changed files with 29 additions and 26 deletions

View File

@@ -100,6 +100,16 @@ export class UserRepository {
.executeTakeFirstOrThrow();
}
@GenerateSql({ params: [DummyValue.UUID] })
getForChangePassword(id: string) {
return this.db
.selectFrom('users')
.select(['users.id', 'users.password'])
.where('users.id', '=', id)
.where('users.deletedAt', 'is', null)
.executeTakeFirstOrThrow();
}
@GenerateSql({ params: [DummyValue.EMAIL] })
getByEmail(email: string, options?: { withPassword?: boolean }) {
return this.db