refactor league module (wip)
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
import { LeagueAdminDTO } from '../dtos/LeagueAdminDTO';
|
||||
import { LeagueJoinRequestDTO } from '../dtos/LeagueJoinRequestDTO';
|
||||
import { LeagueOwnerSummaryDTO } from '../dtos/LeagueOwnerSummaryDTO';
|
||||
import { LeagueConfigFormModelDTO } from '../dtos/LeagueConfigFormModelDTO';
|
||||
import { LeagueAdminProtestsDTO } from '../dtos/LeagueAdminProtestsDTO';
|
||||
import { LeagueSeasonSummaryDTO } from '../dtos/LeagueSeasonSummaryDTO';
|
||||
|
||||
export class LeagueAdminPresenter {
|
||||
private result: LeagueAdminDTO | null = null;
|
||||
@@ -15,11 +20,11 @@ export class LeagueAdminPresenter {
|
||||
seasons: unknown[];
|
||||
}) {
|
||||
this.result = {
|
||||
joinRequests: data.joinRequests,
|
||||
ownerSummary: data.ownerSummary,
|
||||
config: { form: data.config },
|
||||
protests: data.protests,
|
||||
seasons: data.seasons,
|
||||
joinRequests: data.joinRequests as LeagueJoinRequestDTO[],
|
||||
ownerSummary: data.ownerSummary as LeagueOwnerSummaryDTO | null,
|
||||
config: { form: data.config as LeagueConfigFormModelDTO | null },
|
||||
protests: data.protests as LeagueAdminProtestsDTO,
|
||||
seasons: data.seasons as LeagueSeasonSummaryDTO[],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user