volleyballsimtypes 0.0.54 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,7 +19,7 @@ function transformToObject(model) {
|
|
|
19
19
|
return new service_1.Tournament({
|
|
20
20
|
id: model.tournament_id,
|
|
21
21
|
iteration: model.iteration,
|
|
22
|
-
matches: model.TournamentMatches.map(_1.transformToTournamentMatch),
|
|
22
|
+
matches: model.TournamentMatches != null ? model.TournamentMatches.map(_1.transformToTournamentMatch) : [],
|
|
23
23
|
teams: model.tournamentTeams != null ? model.tournamentTeams.map(_1.transformToTeam) : [],
|
|
24
24
|
champion: model.champion_Team != null ? (0, _1.transformToTeam)(model.champion_Team) : undefined
|
|
25
25
|
});
|
|
@@ -30,8 +30,8 @@ function transformToAPIObject(model) {
|
|
|
30
30
|
id: model.tournament_id,
|
|
31
31
|
iteration: model.iteration,
|
|
32
32
|
champion: model.champion != null ? (0, _1.transformToAPITeam)(model.champion_Team) : undefined,
|
|
33
|
-
matches: model.TournamentMatches.map(_1.transformToAPITournamentMatch),
|
|
34
|
-
teams: model.tournamentTeams.map(_1.transformToAPITeam)
|
|
33
|
+
matches: model.TournamentMatches != null ? model.TournamentMatches.map(_1.transformToAPITournamentMatch) : [],
|
|
34
|
+
teams: model.tournamentTeams != null ? model.tournamentTeams.map(_1.transformToAPITeam) : []
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
exports.transformToAPITournament = transformToAPIObject;
|
|
@@ -15,7 +15,7 @@ function transformToObject(model) {
|
|
|
15
15
|
return new Tournament({
|
|
16
16
|
id: model.tournament_id,
|
|
17
17
|
iteration: model.iteration,
|
|
18
|
-
matches: model.TournamentMatches.map(transformToTournamentMatch),
|
|
18
|
+
matches: model.TournamentMatches != null ? model.TournamentMatches.map(transformToTournamentMatch) : [],
|
|
19
19
|
teams: model.tournamentTeams != null ? model.tournamentTeams.map(transformToTeam) : [],
|
|
20
20
|
champion: model.champion_Team != null ? transformToTeam(model.champion_Team) : undefined
|
|
21
21
|
});
|
|
@@ -25,8 +25,8 @@ function transformToAPIObject(model) {
|
|
|
25
25
|
id: model.tournament_id,
|
|
26
26
|
iteration: model.iteration,
|
|
27
27
|
champion: model.champion != null ? transformToAPITeam(model.champion_Team) : undefined,
|
|
28
|
-
matches: model.TournamentMatches.map(transformToAPITournamentMatch),
|
|
29
|
-
teams: model.tournamentTeams.map(transformToAPITeam)
|
|
28
|
+
matches: model.TournamentMatches != null ? model.TournamentMatches.map(transformToAPITournamentMatch) : [],
|
|
29
|
+
teams: model.tournamentTeams != null ? model.tournamentTeams.map(transformToAPITeam) : []
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
export { transformToObject as transformToTournament, transformToAPIObject as transformToAPITournament, transformToAttributes as transformFromTournament };
|