@@ -1,4 +1,4 @@
|
||||
import { IsBoolean, IsInt, IsPositive } from "class-validator";
|
||||
import { IsBoolean, IsInt, IsNotEmpty, IsPositive } from "class-validator";
|
||||
import { Scan } from '../entities/Scan';
|
||||
import { ResponseRunner } from './ResponseRunner';
|
||||
|
||||
@@ -16,8 +16,8 @@ export class ResponseScan {
|
||||
* The scan's associated runner.
|
||||
* This is important to link ran distances to runners.
|
||||
*/
|
||||
// @IsNotEmpty()
|
||||
runner?: ResponseRunner;
|
||||
@IsNotEmpty()
|
||||
runner: ResponseRunner;
|
||||
|
||||
/**
|
||||
* Is the scan valid (for fraud reasons).
|
||||
@@ -39,7 +39,7 @@ export class ResponseScan {
|
||||
*/
|
||||
public constructor(scan: Scan) {
|
||||
this.id = scan.id;
|
||||
this.runner = null;
|
||||
this.runner = scan.runner.toResponse();
|
||||
this.distance = scan.distance;
|
||||
this.valid = scan.valid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user