website refactor

This commit is contained in:
2026-01-16 12:55:48 +01:00
parent 0208334c59
commit 20a42c52fd
83 changed files with 1610 additions and 1238 deletions

View File

@@ -61,7 +61,7 @@ describe('TeamController', () => {
const result = { team: { id: teamId, name: 'Team', tag: 'TAG', description: 'Desc', ownerId: 'owner', leagues: [], isRecruiting: false }, membership: null, canManage: false };
service.getDetails.mockResolvedValue(result);
const mockReq = { user: { userId } } as any;
const mockReq = { user: { userId } } as never;
const response = await controller.getDetails(teamId, mockReq);
@@ -103,7 +103,7 @@ describe('TeamController', () => {
const result = { id: 'team-456', success: true };
service.create.mockResolvedValue(result);
const mockReq = { user: { userId } } as any;
const mockReq = { user: { userId } } as never;
const response = await controller.create(input, mockReq);
@@ -120,7 +120,7 @@ describe('TeamController', () => {
const result = { success: true };
service.update.mockResolvedValue(result);
const mockReq = { user: { userId } } as any;
const mockReq = { user: { userId } } as never;
const response = await controller.update(teamId, input, mockReq);
@@ -157,7 +157,7 @@ describe('TeamController', () => {
});
describe('auth guards (HTTP)', () => {
let app: any;
let app: import("@nestjs/common").INestApplication;
const sessionPort: { getCurrentSession: () => Promise<null | { token: string; user: { id: string } }> } = {
getCurrentSession: vi.fn(async () => null),
@@ -196,9 +196,9 @@ describe('TeamController', () => {
const reflector = new Reflector();
app.useGlobalGuards(
new AuthenticationGuard(sessionPort as any),
new AuthorizationGuard(reflector, authorizationService as any),
new FeatureAvailabilityGuard(reflector, policyService as any),
new AuthenticationGuard(sessionPort as never),
new AuthorizationGuard(reflector, authorizationService as never),
new FeatureAvailabilityGuard(reflector, policyService as never),
);
await app.init();