исправление конфликтов

This commit is contained in:
Табеев Александр 2024-05-28 23:36:22 +04:00
parent ee36069742
commit 4ded692e1e

View File

@ -14,15 +14,13 @@ namespace ServiceStationRestApi.Controllers
private readonly IGuarantorReportLogic _guarantorReportLogic; private readonly IGuarantorReportLogic _guarantorReportLogic;
private readonly AbstractMailWorker _mailWorker; private readonly AbstractMailWorker _mailWorker;
private readonly IGuarantorReportLogic _guarantorReportLogic; private readonly IGuarantorReportLogic _guarantorReportLogic;
private readonly AbstractMailWorker _mailWorker;
public ReportController(ILogger<ReportController> logger, IExecutorReportLogic executorReportLogic, IGuarantorReportLogic guarantorReportLogic) public ReportController(ILogger<ReportController> logger, IExecutorReportLogic executorReportLogic, AbstractMailWorker abstractMailWorker, IGuarantorLogic guarantorReportLogic)
{ {
_logger = logger; _logger = logger;
_executorReportLogic = executorReportLogic; _executorReportLogic = executorReportLogic;
_mailWorker = abstractMailWorker; _mailWorker = abstractMailWorker;
_guarantorReportLogic = guarantorReportLogic; _guarantorReportLogic = guarantorReportLogic;
_mailWorker = mailWorker;
} }
[HttpPost] [HttpPost]
@ -70,6 +68,19 @@ namespace ServiceStationRestApi.Controllers
throw; throw;
} }
} }
[HttpPost]
public void SendPdfToMail(MailSendInfoBindingModel model)
{
try
{
_mailWorker.MailSendAsync(model);
}
catch (Exception ex)
{
_logger.LogError(ex, "Ошибка отправки письма");
throw;
}
}
[HttpPost] [HttpPost]
public void CreateGuarantorReportToWord(ReportGuarantorBindingModel model) public void CreateGuarantorReportToWord(ReportGuarantorBindingModel model)
@ -118,18 +129,6 @@ namespace ServiceStationRestApi.Controllers
throw; throw;
} }
} }
[HttpPost]
public void SendPdfToMail(MailSendInfoBindingModel model)
{
try
{
_mailWorker.MailSendAsync(model);
}
catch (Exception ex)
{
_logger.LogError(ex, "Ошибка отправки письма");
throw;
}
}
} }
} }