website refactor
This commit is contained in:
@@ -52,4 +52,22 @@ export class SponsorService implements Service {
|
||||
async getSponsorshipPricing(): Promise<any> {
|
||||
return this.apiClient.getPricing();
|
||||
}
|
||||
|
||||
async getAvailableLeagues(): Promise<Result<any[], DomainError>> {
|
||||
try {
|
||||
const data = await this.apiClient.getAvailableLeagues();
|
||||
return Result.ok(data);
|
||||
} catch (error) {
|
||||
return Result.err({ type: 'serverError', message: error instanceof Error ? error.message : 'Unknown error' });
|
||||
}
|
||||
}
|
||||
|
||||
async getLeagueDetail(leagueId: string): Promise<Result<any, DomainError>> {
|
||||
try {
|
||||
const data = await this.apiClient.getLeagueDetail(leagueId);
|
||||
return Result.ok(data);
|
||||
} catch (error) {
|
||||
return Result.err({ type: 'serverError', message: error instanceof Error ? error.message : 'Unknown error' });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user