harden media
This commit is contained in:
@@ -32,8 +32,8 @@ export class TeamService {
|
||||
* Get all teams with view model transformation
|
||||
*/
|
||||
async getAllTeams(): Promise<TeamSummaryViewModel[]> {
|
||||
const dto: GetAllTeamsOutputDTO = await this.apiClient.getAll();
|
||||
return dto.teams.map((team: TeamListItemDTO) => new TeamSummaryViewModel(team));
|
||||
const dto: GetAllTeamsOutputDTO | null = await this.apiClient.getAll();
|
||||
return (dto?.teams || []).map((team: TeamListItemDTO) => new TeamSummaryViewModel(team));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user