Adjusted the comments for tsdoc

ref #8 #3
This commit is contained in:
2020-11-27 22:19:07 +01:00
parent 15552eff54
commit f0a7cbbcae
3 changed files with 24 additions and 9 deletions

View File

@@ -1,6 +1,10 @@
import { JsonController, Param, Body, Get, Post, Put, Delete, NotFoundError, OnUndefined, NotAcceptableError } from 'routing-controllers';
import { IsInt, IsNotEmpty, IsPositive, IsString } from 'class-validator';
/**
* 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 {
@IsString()
name = "TrackNotFoundError"
@@ -9,9 +13,14 @@ export class TrackNotFoundError extends NotFoundError {
message = "Track not found!"
}
export class TrackIdChangeNotAllowedError extends NotAcceptableError {
/**
* Error to throw when two tracks' ids don't match.
* 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 {
@IsString()
name = "TrackIdChangeNotAllowed"
name = "TrackIdsNotMatchingError"
@IsString()
message = "The id's don't match!! \n And if you wanted to change a track's id: This isn't allowed"