mirror of
https://github.com/standardnotes/server
synced 2026-07-31 23:16:44 -04:00
feat(auth): retain user agent, api version and received at on revoked sessions
This commit is contained in:
@@ -20,6 +20,17 @@ export class MySQLRevokedSessionRepository implements RevokedSessionRepositoryIn
|
||||
return this.ormRepository.remove(revokedSession)
|
||||
}
|
||||
|
||||
async clearUserAgentByUserUuid(userUuid: string): Promise<void> {
|
||||
await this.ormRepository
|
||||
.createQueryBuilder('revoked_session')
|
||||
.update()
|
||||
.set({
|
||||
userAgent: null,
|
||||
})
|
||||
.where('user_uuid = :userUuid', { userUuid })
|
||||
.execute()
|
||||
}
|
||||
|
||||
async findAllByUserUuid(userUuid: string): Promise<RevokedSession[]> {
|
||||
return this.ormRepository
|
||||
.createQueryBuilder('revoked_session')
|
||||
|
||||
Reference in New Issue
Block a user