diff --git a/Bank/BankRestApi/Controllers/ReportController.cs b/Bank/BankRestApi/Controllers/ReportController.cs index f6820ab..26b15d3 100644 --- a/Bank/BankRestApi/Controllers/ReportController.cs +++ b/Bank/BankRestApi/Controllers/ReportController.cs @@ -74,6 +74,25 @@ namespace BankRestApi.Controllers } } [HttpPost] + public void SendOperationsRequestsToEmail(ReportBindingModel model) + { + try + { + _logic.SaveOperationsRequestsToPdfFile(model); + _mailWorker.MailSendAsync(new MailSendInfoBindingModel + { + MailAddress = model.Email!, + Subject = "Отчет по животным", + Text = "Лови" + }); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка сохранения переводов в ворд"); + throw; + } + } + [HttpPost] public void SendTransfersWithdrawalsToEmail(ReportBindingModel model) { try