From b3770d4a65fcdd058139e3d0de7c91a8711a2851 Mon Sep 17 00:00:00 2001 From: Artyom_Yashin Date: Mon, 27 May 2024 02:01:45 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ReportController.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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