parent
a9ecfccfd2
commit
35dbfeb5e7
|
@ -40,6 +40,12 @@ export class ResponseStatsRunner {
|
|||
@IsInt()
|
||||
distance: number;
|
||||
|
||||
/**
|
||||
* The runner's currently collected donations.
|
||||
*/
|
||||
@IsInt()
|
||||
donationAmount: number;
|
||||
|
||||
/**
|
||||
* The runner's group.
|
||||
*/
|
||||
|
@ -55,6 +61,7 @@ export class ResponseStatsRunner {
|
|||
this.middlename = runner.middlename;
|
||||
this.lastname = runner.lastname;
|
||||
this.distance = runner.scans.filter(scan => { scan.valid === true }).reduce((sum, current) => sum + current.distance, 0);
|
||||
this.donationAmount = runner.distanceDonationAmount;
|
||||
this.group = runner.group;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue