Implemented cascading station deletion

ref #67
This commit is contained in:
2021-01-07 18:48:58 +01:00
parent 2628f69651
commit 9b9ee70288
2 changed files with 39 additions and 16 deletions

View File

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