This commit is contained in:
2018-09-25 18:01:30 +00:00
parent 51832b532d
commit 52ba3bb970
4 changed files with 118 additions and 15 deletions

View File

@@ -210,8 +210,8 @@ namespace AyaNova.Api.Controllers
{
//Log
EventLogProcessor.AddEntry(new Event(biz.userId, o.Id, AyaType.Widget, AyaEvent.Modified), ct);
Search.ProcessUpdatedObjectKeywords(ct, UserLocaleIdFromContext.Id(HttpContext.Items), o.Id, AyaType.Widget, o.Name, o.Notes, o.Name);
await ct.SaveChangesAsync();
Search.ProcessUpdatedObjectKeywords(ct, UserLocaleIdFromContext.Id(HttpContext.Items), o.Id, AyaType.Widget, o.Name, o.Notes, o.Name);
}
catch (DbUpdateConcurrencyException)
{
@@ -291,7 +291,7 @@ namespace AyaNova.Api.Controllers
//this will save the context as part of it's operations
Search.ProcessUpdatedObjectKeywords(ct, UserLocaleIdFromContext.Id(HttpContext.Items), o.Id, AyaType.Widget, o.Name, o.Notes, o.Name);
}
catch (DbUpdateConcurrencyException)
{
@@ -359,7 +359,7 @@ namespace AyaNova.Api.Controllers
//this will save the context as part of it's operations
Search.ProcessNewObjectKeywords(ct, UserLocaleIdFromContext.Id(HttpContext.Items), o.Id, AyaType.Widget, o.Name, o.Notes, o.Name);
//return success and link
return CreatedAtAction("GetWidget", new { id = o.Id }, new ApiCreatedResponse(o));
@@ -416,7 +416,7 @@ namespace AyaNova.Api.Controllers
//This will directly execute and is not part of context for saving purposes
Search.ProcessDeletedObjectKeywords(ct, dbObj.Id, AyaType.Widget);
//Delete children / attached objects
biz.DeleteChildren(dbObj);