website cleanup

This commit is contained in:
2025-12-24 21:44:58 +01:00
parent 9b683a59d3
commit d78854a4c6
277 changed files with 6141 additions and 2693 deletions

View File

@@ -11,6 +11,7 @@ import type { RaceDetailLeagueDTO } from '../../types/generated/RaceDetailLeague
import type { RaceDetailEntryDTO } from '../../types/generated/RaceDetailEntryDTO';
import type { RaceDetailRegistrationDTO } from '../../types/generated/RaceDetailRegistrationDTO';
import type { RaceDetailUserResultDTO } from '../../types/generated/RaceDetailUserResultDTO';
import type { FileProtestCommandDTO } from '../../types/generated/FileProtestCommandDTO';
// Define missing types
type RacesPageDataDTO = { races: RacesPageDataRaceDTO[] };
@@ -42,8 +43,9 @@ export class RacesApiClient extends BaseApiClient {
}
/** Get races page data */
getPageData(): Promise<RacesPageDataDTO> {
return this.get<RacesPageDataDTO>('/races/page-data');
getPageData(leagueId?: string): Promise<RacesPageDataDTO> {
const query = leagueId ? `?leagueId=${encodeURIComponent(leagueId)}` : '';
return this.get<RacesPageDataDTO>(`/races/page-data${query}`);
}
/** Get race detail */
@@ -90,4 +92,9 @@ export class RacesApiClient extends BaseApiClient {
reopen(raceId: string): Promise<void> {
return this.post<void>(`/races/${raceId}/reopen`, {});
}
}
/** File a protest */
fileProtest(input: FileProtestCommandDTO): Promise<void> {
return this.post<void>('/races/protests/file', input);
}
}