feat(api, bll, dal, generatorTemplates, templateActivator): запись истории изменения шаблонов

This commit is contained in:
Mikhail Trubnikov
2024-10-08 10:29:34 +10:00
parent 54fed9b597
commit a494b69ee6
22 changed files with 140 additions and 67 deletions

View File

@@ -11,6 +11,7 @@ using PARR.API.Controllers.V1.Base;
using PARR.API.Extensions;
using PARR.API.Services.Interfaces;
using PARR.BLL.Helpers;
using PARR.Common.Domain;
using PARR.Constants;
using PARR.DAL.Contracts;
using PARR.DAL.DomainModels;
@@ -143,7 +144,7 @@ namespace PARR.API.Controllers.V1
robotConfigurationService.ChangeTaskStatus(TaskStatusEnum.Updating, ref config);
}
if (!await templateService.CommitAsync(new DAL.Models.Base.History.Base.HistoryInitiator { InitiatorComment = "Изменён статус шаблона/расписания", InitiatorIp = clientService.GetClientIp()?.ToString(), InitiatorParrComponentId = ParrComponentsEnum.Api }))
if (!await templateService.CommitAsync(new HistoryInitiator { InitiatorComment = "Изменён статус шаблона/расписания", InitiatorIp = clientService.GetClientIp()?.ToString(), InitiatorParrComponentId = ParrComponentsEnum.Api }))
return BadRequest(new Response(false, new List<ErrorModel> { new ErrorModel { Message = "Ошибка при изменении шаблона." } }));
var templateToResponse = await templateService.GetWithIncludes()