feat: migration api keys to use kysely (#15206)

This commit is contained in:
Jason Rasmussen 2025-01-10 14:02:12 -05:00 committed by GitHub
parent 3030e74fc3
commit 930f979960
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 151 additions and 107 deletions

View file

@ -1,8 +1,16 @@
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';
export const keyStub = {
authKey: Object.freeze({
id: 'my-random-guid',
key: 'my-api-key (hashed)',
user: userStub.admin,
permissions: [],
} as AuthApiKey),
admin: Object.freeze({
id: 'my-random-guid',
name: 'My Key',