website refactor

This commit is contained in:
2026-01-17 18:28:10 +01:00
parent 6d57f8b1ce
commit 64d9e7fd16
44 changed files with 1729 additions and 415 deletions

View File

@@ -132,12 +132,12 @@ export class LeagueService implements Service {
}
}
async getAllLeagues(): Promise<any> {
async getAllLeagues(): Promise<Result<AllLeaguesWithCapacityAndScoringDTO, DomainError>> {
try {
const dto = await this.apiClient.getAllWithCapacityAndScoring();
return (dto as any).value || dto;
return Result.ok(dto);
} catch (error: unknown) {
throw error;
return Result.err({ type: 'serverError', message: (error as Error).message || 'Failed to fetch leagues' });
}
}