test apps api
This commit is contained in:
@@ -204,7 +204,17 @@ export class LeagueService {
|
||||
async getAllLeaguesWithCapacity(): Promise<AllLeaguesWithCapacityViewModel> {
|
||||
this.logger.debug('[LeagueService] Fetching all leagues with capacity.');
|
||||
|
||||
await this.getAllLeaguesWithCapacityUseCase.execute();
|
||||
const result = await this.getAllLeaguesWithCapacityUseCase.execute({});
|
||||
|
||||
if (result.isErr()) {
|
||||
const err = result.unwrapErr();
|
||||
this.logger.error('[LeagueService] Failed to fetch leagues with capacity', new Error(err.code), {
|
||||
details: err.details,
|
||||
});
|
||||
throw new Error(err.code);
|
||||
}
|
||||
|
||||
this.allLeaguesWithCapacityPresenter.present(result.unwrap());
|
||||
return this.allLeaguesWithCapacityPresenter.getViewModel();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user