This commit is contained in:
2021-11-18 23:45:16 +00:00
parent fab6212113
commit 0c31799f8e
2 changed files with 26 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
using AyaNova.Util;
using AyaNova.Api.ControllerHelpers;
using AyaNova.Models;
using System.Collections.Generic;
namespace AyaNova.Biz
{
@@ -70,6 +71,10 @@ namespace AyaNova.Biz
}
Validate(putObject, dbObject);
if (HasErrors) return null;
List<string> originalTags = dbObject.AllTags();
List<string> newTags = putObject.AllTags();
ct.Replace(dbObject, putObject);
@@ -87,6 +92,7 @@ namespace AyaNova.Biz
//Log modification and save context
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, 1, BizType, AyaEvent.Modified), ct);
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newTags, originalTags);
return putObject;
}