refactor: api key repository (#15491)

This commit is contained in:
Jason Rasmussen 2025-01-21 11:45:59 -05:00 committed by GitHub
parent 1745f48f3d
commit 9a1068c867
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 44 additions and 72 deletions

View file

@ -1,5 +1,3 @@
import { APIKeyEntity } from 'src/entities/api-key.entity';
import { AuthApiKey } from 'src/types';
import { authStub } from 'test/fixtures/auth.stub';
import { userStub } from 'test/fixtures/user.stub';
@ -9,7 +7,7 @@ export const keyStub = {
key: 'my-api-key (hashed)',
user: userStub.admin,
permissions: [],
} as AuthApiKey),
} as any),
admin: Object.freeze({
id: 'my-random-guid',
@ -17,5 +15,6 @@ export const keyStub = {
key: 'my-api-key (hashed)',
userId: authStub.admin.user.id,
user: userStub.admin,
} as APIKeyEntity),
permissions: [],
} as any),
};