stats/runners/laptime feature/190-runners_laptime #191
@ -49,7 +49,15 @@ export class ResponseStatsOrgnisation implements IResponse {
|
||||
public constructor(org: RunnerOrganization) {
|
||||
this.name = org.name;
|
||||
this.id = org.id;
|
||||
try {
|
||||
this.distance = org.distance;
|
||||
} catch {
|
||||
this.distance = -1;
|
||||
}
|
||||
try {
|
||||
this.donationAmount = org.distanceDonationAmount;
|
||||
} catch {
|
||||
this.donationAmount = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,15 @@ export class ResponseStatsTeam implements IResponse {
|
||||
this.name = team.name;
|
||||
this.id = team.id;
|
||||
this.parent = team.parentGroup.toResponse();
|
||||
try {
|
||||
this.distance = team.distance;
|
||||
} catch {
|
||||
this.distance = -1;
|
||||
}
|
||||
try {
|
||||
this.donationAmount = team.distanceDonationAmount;
|
||||
} catch {
|
||||
this.donationAmount = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user