fix seeds

This commit is contained in:
2026-01-09 00:06:53 +01:00
parent d689df0270
commit 6f2ab9fc56
2 changed files with 19 additions and 7 deletions

View File

@@ -288,9 +288,7 @@ export class LeagueService {
throw new Error(err.code);
}
// The use case calls presenter.present() internally
// The presenter now handles logo resolution synchronously
// Just get the view model which contains the resolved logo URLs
this.allLeaguesWithCapacityAndScoringPresenter.present(result.unwrap());
return this.allLeaguesWithCapacityAndScoringPresenter.getViewModel();
}
@@ -481,6 +479,7 @@ export class LeagueService {
throw new Error(err.code);
}
this.removeLeagueMemberPresenter.present(result.unwrap());
return this.removeLeagueMemberPresenter.getViewModel()!;
}
@@ -518,6 +517,7 @@ export class LeagueService {
throw new Error(err.code);
}
this.updateLeagueMemberRolePresenter.present(result.unwrap());
return this.updateLeagueMemberRolePresenter.getViewModel()!;
}
@@ -535,7 +535,11 @@ export class LeagueService {
this.logger.debug('Getting league full config', { query });
try {
await this.getLeagueFullConfigUseCase.execute(query);
const result = await this.getLeagueFullConfigUseCase.execute(query);
if (result.isErr()) {
throw new Error(result.unwrapErr().code);
}
this.leagueConfigPresenter.present(result.unwrap());
return this.leagueConfigPresenter.getViewModel();
} catch (error) {
this.logger.error('Error getting league full config', error instanceof Error ? error : new Error(String(error)));
@@ -814,7 +818,11 @@ export class LeagueService {
this.logger.debug('Getting league scoring config', { leagueId });
try {
await this.getLeagueScoringConfigUseCase.execute({ leagueId });
const result = await this.getLeagueScoringConfigUseCase.execute({ leagueId });
if (result.isErr()) {
throw new Error(result.unwrapErr().code);
}
this.leagueScoringConfigPresenter.present(result.unwrap());
return this.leagueScoringConfigPresenter.getViewModel();
} catch (error) {
this.logger.error('Error getting league scoring config', error instanceof Error ? error : new Error(String(error)));