Bugfixes for trackscans feature/160-responseTrackScan_total_distance #161

Merged
niggl merged 13 commits from feature/160-responseTrackScan_total_distance into dev 2021-03-17 18:40:50 +00:00
Showing only changes of commit 1f32ed0727 - Show all commits

View File

@ -1,4 +1,5 @@
import { IsInt, IsPositive } from 'class-validator';
import { IsInt, IsOptional, IsPositive } from 'class-validator';
import { NotAcceptableError } from 'routing-controllers';
import { getConnection } from 'typeorm';
import { RunnerCardNotFoundError } from '../../../errors/RunnerCardErrors';
import { RunnerNotFoundError } from '../../../errors/RunnerErrors';
@ -22,10 +23,12 @@ export class CreateTrackScan {
/**
* The scanning station's id that created the scan.
* Mainly used for logging and traceing back scans (or errors).
* You don't have to provide the station if you're authenticateing via a scanstation token (The server takes care of it for you).
*/
@IsInt()
@IsPositive()
station: number;
@IsOptional()
station?: number;
/**
* Creates a new Track entity from this.