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 DonorReceiptAddressNeededError extends NotAcceptableError {
@IsString()
message = "An address is needed to create a receipt for a donor. \n You didn't provide one."
}
/**
* Error to throw when a donor still has donations associated.
*/
export class DonorHasDonationsError extends NotAcceptableError {
@IsString()
name = "DonorHasDonationsError"
@IsString()
message = "This donor still has donations associated with it. \n If you want to delete this donor with all it's donations and teams add `?force` to your query."
}