Cleaned up realations regarding response classes
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
ref #132
This commit is contained in:
@@ -4,9 +4,9 @@ import {
|
||||
IsString
|
||||
} from "class-validator";
|
||||
import { Runner } from '../entities/Runner';
|
||||
import { RunnerGroup } from '../entities/RunnerGroup';
|
||||
import { ResponseObjectType } from '../enums/ResponseObjectType';
|
||||
import { IResponse } from './IResponse';
|
||||
import { ResponseRunnerGroup } from './ResponseRunnerGroup';
|
||||
|
||||
/**
|
||||
* Defines the runner stats response.
|
||||
@@ -59,7 +59,7 @@ export class ResponseStatsRunner implements IResponse {
|
||||
* The runner's group.
|
||||
*/
|
||||
@IsObject()
|
||||
group: RunnerGroup;
|
||||
group: ResponseRunnerGroup;
|
||||
|
||||
/**
|
||||
* Creates a new runner stats response from a runner
|
||||
@@ -72,6 +72,6 @@ export class ResponseStatsRunner implements IResponse {
|
||||
this.lastname = runner.lastname;
|
||||
this.distance = runner.distance;
|
||||
this.donationAmount = runner.distanceDonationAmount;
|
||||
this.group = runner.group;
|
||||
this.group = runner.group.toResponse();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user