Fixed messages and comments for TrackErrors + spelling for some other errors

ref #39
This commit is contained in:
Nicolai Ort 2020-12-20 18:48:59 +01:00
parent 389f6347c3
commit 75b6489f8d
4 changed files with 6 additions and 8 deletions

View File

@ -21,7 +21,7 @@ export class PermissionIdsNotMatchingError extends NotAcceptableError {
name = "PermissionIdsNotMatchingError" name = "PermissionIdsNotMatchingError"
@IsString() @IsString()
message = "The id's don't match!! \n And if you wanted to change a permission's id: This isn't allowed!" message = "The ids don't match! \n And if you wanted to change a permission's id: This isn't allowed!"
} }
/** /**

View File

@ -21,7 +21,7 @@ export class RunnerIdsNotMatchingError extends NotAcceptableError {
name = "RunnerIdsNotMatchingError" name = "RunnerIdsNotMatchingError"
@IsString() @IsString()
message = "The id's don't match!! \n And if you wanted to change a runner's id: This isn't allowed!" message = "The ids don't match! \n And if you wanted to change a runner's id: This isn't allowed!"
} }
/** /**

View File

@ -21,7 +21,7 @@ export class RunnerOrganisationIdsNotMatchingError extends NotAcceptableError {
name = "RunnerOrganisationIdsNotMatchingError" name = "RunnerOrganisationIdsNotMatchingError"
@IsString() @IsString()
message = "The id's don't match!! \n And if you wanted to change a runner organisation's id: This isn't allowed!" message = "The ids don't match! \n And if you wanted to change a runner organisation's id: This isn't allowed!"
} }
/** /**

View File

@ -1,9 +1,8 @@
import { JsonController, Param, Body, Get, Post, Put, Delete, NotFoundError, OnUndefined, NotAcceptableError } from 'routing-controllers'; import { IsString } from 'class-validator';
import { IsInt, IsNotEmpty, IsPositive, IsString } from 'class-validator'; import { NotAcceptableError, NotFoundError } from 'routing-controllers';
/** /**
* Error to throw when a track couldn't be found. * Error to throw when a track couldn't be found.
* Implemented this ways to work with the json-schema conversion for openapi.
*/ */
export class TrackNotFoundError extends NotFoundError { export class TrackNotFoundError extends NotFoundError {
@IsString() @IsString()
@ -16,12 +15,11 @@ export class TrackNotFoundError extends NotFoundError {
/** /**
* Error to throw when two tracks' ids don't match. * Error to throw when two tracks' ids don't match.
* Usually occurs when a user tries to change a track's id. * Usually occurs when a user tries to change a track's id.
* Implemented this ways to work with the json-schema conversion for openapi.
*/ */
export class TrackIdsNotMatchingError extends NotAcceptableError { export class TrackIdsNotMatchingError extends NotAcceptableError {
@IsString() @IsString()
name = "TrackIdsNotMatchingError" name = "TrackIdsNotMatchingError"
@IsString() @IsString()
message = "The id's don't match!! \n And if you wanted to change a track's id: This isn't allowed" message = "The ids don't match! \n And if you wanted to change a track's id: This isn't allowed"
} }