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 { getConnection } from 'typeorm';
|
||||||
import { RunnerCardNotFoundError } from '../../../errors/RunnerCardErrors';
|
import { RunnerCardNotFoundError } from '../../../errors/RunnerCardErrors';
|
||||||
import { RunnerNotFoundError } from '../../../errors/RunnerErrors';
|
import { RunnerNotFoundError } from '../../../errors/RunnerErrors';
|
||||||
@ -22,10 +23,12 @@ export class CreateTrackScan {
|
|||||||
/**
|
/**
|
||||||
* The scanning station's id that created the scan.
|
* The scanning station's id that created the scan.
|
||||||
* Mainly used for logging and traceing back scans (or errors).
|
* 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()
|
@IsInt()
|
||||||
@IsPositive()
|
@IsPositive()
|
||||||
station: number;
|
@IsOptional()
|
||||||
|
station?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Track entity from this.
|
* Creates a new Track entity from this.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user