Release 0.6.2 #162

Merged
niggl merged 19 commits from dev into main 2021-03-17 18:43:46 +00:00
Showing only changes of commit 1fa3fa75ee - Show all commits

View File

@ -1,5 +1,5 @@
import { IsInt, IsOptional, IsPositive } from 'class-validator'; import { IsInt, IsOptional, IsPositive } from 'class-validator';
import { NotAcceptableError } from 'routing-controllers'; import { BadRequestError } 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';
@ -70,7 +70,7 @@ export class CreateTrackScan {
*/ */
public async getStation(): Promise<ScanStation> { public async getStation(): Promise<ScanStation> {
if (!this.station) { if (!this.station) {
throw new NotAcceptableError("You are missing the station's id!") throw new BadRequestError("You are missing the station's id!")
} }
const station = await getConnection().getRepository(ScanStation).findOne({ id: this.station }, { relations: ["track"] }); const station = await getConnection().getRepository(ScanStation).findOne({ id: this.station }, { relations: ["track"] });
if (!station) { if (!station) {