mirror of
https://github.com/michivonah/themepark-assistant.git
synced 2025-12-22 22:16:29 +01:00
install zod for input validation
This commit is contained in:
parent
0b11cccf33
commit
9a4fd29fa5
4 changed files with 50 additions and 8 deletions
|
|
@ -24,8 +24,12 @@ export class MissingParameter extends HTTPException{
|
|||
}
|
||||
|
||||
export class InvalidParameter extends HTTPException{
|
||||
constructor(paramName: string){
|
||||
super(400, { message: `Provided parameter '${paramName}' is invalid.` })
|
||||
constructor(paramName?: string){
|
||||
super(400, { message:
|
||||
paramName
|
||||
? `Provided parameter '${paramName}' is invalid.`
|
||||
: 'Provided invalid parameter.'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue