refactor(server): use cascades for keys and tokens (#2544)

This commit is contained in:
Jason Rasmussen
2023-05-23 16:40:04 -04:00
committed by GitHub
parent e2bd7e1e08
commit 50a792a81a
19 changed files with 100 additions and 126 deletions

View File

@@ -21,10 +21,6 @@ export class APIKeyRepository implements IKeyRepository {
await this.repository.delete({ userId, id });
}
async deleteAll(userId: string): Promise<void> {
await this.repository.delete({ userId });
}
getKey(hashedToken: string): Promise<APIKeyEntity | null> {
return this.repository.findOne({
select: {