mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor: api key repository (#15491)
This commit is contained in:
parent
1745f48f3d
commit
9a1068c867
12 changed files with 44 additions and 72 deletions
7
server/test/fixtures/api-key.stub.ts
vendored
7
server/test/fixtures/api-key.stub.ts
vendored
|
|
@ -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),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue