website cleanup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user