Implmented cascading donation deletion for runners and donors

ref #66
This commit is contained in:
2021-01-12 19:33:54 +01:00
parent f7370bc802
commit e716fae1c5
4 changed files with 46 additions and 5 deletions

View File

@@ -33,4 +33,15 @@ export class RunnerGroupNeededError extends NotAcceptableError {
@IsString()
message = "Runner's need to be part of one group (team or organisation)! \n You provided neither."
}
/**
* Error to throw when a runner still has distance donations associated.
*/
export class RunnerHasDistanceDonationsError extends NotAcceptableError {
@IsString()
name = "RunnerHasDistanceDonationsError"
@IsString()
message = "This runner still has distance donations associated with it. \n If you want to delete this runner with all it's donations and teams add `?force` to your query."
}