feat(api, nextRun): записывать в историю template инициатора

This commit is contained in:
Mikhail Trubnikov
2024-10-08 16:37:58 +10:00
parent 7155156f66
commit 5e0c249f1b
2 changed files with 4 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using PARR.BLL.Services.Interfaces;
using PARR.Common.Domain;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.TransformServices;
using PARR.NextRun.Settings;
@@ -67,7 +68,7 @@ namespace PARR.NextRun
template.LastRun = template.NextRun;
template.NextRun = nextRun;
if (await templateService.CommitAsync())
if (await templateService.CommitAsync(new HistoryInitiator { InitiatorComment = "Обновлён NextRun", InitiatorParrComponentId = Constants.ParrComponentsEnum.NextRun }))
logger.LogDebug($"Обновлены значения полей NextRun: {template.NextRun}, LastRun: {template.LastRun} для шаблона {template.Name}, {template.Id}");
else
{