website refactor
This commit is contained in:
@@ -41,6 +41,15 @@ export class RaceService implements Service {
|
||||
}
|
||||
}
|
||||
|
||||
async getAllRacesPageData(): Promise<Result<any, DomainError>> {
|
||||
try {
|
||||
const data = await this.apiClient.getPageData();
|
||||
return Result.ok(data);
|
||||
} catch (error: unknown) {
|
||||
return Result.err(this.mapError(error, 'Failed to fetch all races page data'));
|
||||
}
|
||||
}
|
||||
|
||||
async findByLeagueId(leagueId: string): Promise<Result<unknown[], DomainError>> {
|
||||
try {
|
||||
const result = await this.apiClient.getPageData(leagueId);
|
||||
|
||||
Reference in New Issue
Block a user