refactor(auth): passkeys and registration invites through repositories

This commit is contained in:
jubnl
2026-09-22 20:25:50 +02:00
parent daef15be70
commit e9d0cb60e0
14 changed files with 1045 additions and 130 deletions
@@ -60,7 +60,7 @@ import { AdminService } from '../../../src/nest/admin/admin.service';
import { makeNotificationsService, makeNotificationPreferencesService } from '../../helpers/notifications';
import { EphemeralTokenService } from '../../../src/nest/auth/ephemeral-token.service';
import { AllowedFileTypesService } from '../../../src/nest/files/allowed-file-types.service';
import { createTestUnitOfWork, createTestAppSettingsRepo, createTestUsersRepo } from '../../helpers/test-uow';
import { createTestUnitOfWork, createTestAppSettingsRepo, createTestUsersRepo, createTestWebauthnCredentialsRepo, createTestWebauthnChallengesRepo } from '../../helpers/test-uow';
const dbs = new DatabaseService(testDb);
const realtime = new RealtimeService();
@@ -84,7 +84,7 @@ beforeAll(async () => {
svc = new AdminService(
dbs,
await createTestAddonsService(testDb, dbs),
new PasskeyService(dbs, auth, webauthn, await createTestUnitOfWork(dbs.connection)),
new PasskeyService(auth, webauthn, await createTestUnitOfWork(dbs.connection), await createTestWebauthnCredentialsRepo(dbs.connection), await createTestWebauthnChallengesRepo(dbs.connection), await createTestUsersRepo(dbs.connection)),
auth,
permissions,
await makeNotificationsService(dbs, realtime),