Create models now feature the createparticipant abstract

ref #13
This commit is contained in:
2020-12-04 22:40:14 +01:00
parent afef95e14e
commit 56202ec309
4 changed files with 189 additions and 52 deletions

View File

@@ -0,0 +1,18 @@
import { IsString } from 'class-validator';
import { NotAcceptableError, NotFoundError } from 'routing-controllers';
export class ParticipantOnlyOneAddressAllowedError extends NotAcceptableError {
@IsString()
name = "ParticipantOnlyOneAddressAllowedError"
@IsString()
message = "Participant's can only have one address! \n You provided an id and address object.."
}
export class ParticipantAddressNotFoundError extends NotFoundError {
@IsString()
name = "ParticipantAddressNotFoundError"
@IsString()
message = "The address you provided couldn't be located in the system. \n Please check your request."
}