Marked station as optional (quality of life improvements incoming)
ref #160
This commit is contained in:
parent
289f9e2196
commit
1f32ed0727
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue