public async Task DeleteCampaign([FromRoute] string campaignId) { await _emailService.DeleteCampaignEmailsAsync(campaignId); await _emailTemplateService.DeleteCampaignTemplatesAsync(campaignId); await _addressRepository.DeleteAsync(campaignId); await _campaignSettingsRepository.DeleteAsync(campaignId); await _log.WriteInfoAsync(nameof(DeleteCampaign), campaignId, "Campaign deleted"); }
public async Task <IActionResult> DeletePayInAddress( [FromRoute] string address, [FromRoute] CurrencyType currency) { if (!ModelState.IsValid) { return(BadRequest(ErrorResponseFactory.Create(ModelState))); } await _addressRepository.DeleteAsync(address, currency); await _log.WriteInfoAsync(nameof(AddPayInAddress), $"Address: {address}, Currency: {Enum.GetName(typeof(CurrencyType), currency)}", "Pay-in address deleted"); return(Ok()); }