Added card deletion + errors

ref #77
This commit is contained in:
2021-01-09 11:28:59 +01:00
parent 4faeddc3f3
commit a5bfe4e3d5
2 changed files with 37 additions and 23 deletions

View File

@@ -22,4 +22,15 @@ export class RunnerCardIdsNotMatchingError extends NotAcceptableError {
@IsString()
message = "The ids don't match! \n And if you wanted to change a cards's id: This isn't allowed"
}
}
/**
* Error to throw when a station still has scans associated.
*/
export class RunnerCardHasScansError extends NotAcceptableError {
@IsString()
name = "RunnerCardHasScansError"
@IsString()
message = "This card still has scans associated with it. \n If you want to delete this card with all it's scans add `?force` to your query. \n Otherwise please consider just diableing it."
}