This commit is contained in:
@@ -210,7 +210,7 @@ namespace AyaNova.Api.Controllers
|
||||
{
|
||||
//Log
|
||||
EventLogProcessor.AddEntry(new Event(biz.userId, o.Id, AyaType.Widget, AyaEvent.Modified), ct);
|
||||
Search.ProcessUpdatedObjectKeywords(ct, LocaleIdFromContext.Id(HttpContext.Items), o.Id, AyaType.Widget, o.Name, o.Notes);
|
||||
Search.ProcessUpdatedObjectKeywords(ct, LocaleIdFromContext.Id(HttpContext.Items), o.Id, AyaType.Widget, o.Name, o.Notes, o.Name);
|
||||
await ct.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
@@ -287,8 +287,11 @@ namespace AyaNova.Api.Controllers
|
||||
{
|
||||
//Log
|
||||
EventLogProcessor.AddEntry(new Event(biz.userId, o.Id, AyaType.Widget, AyaEvent.Modified), ct);
|
||||
Search.ProcessUpdatedObjectKeywords(ct, LocaleIdFromContext.Id(HttpContext.Items), o.Id, AyaType.Widget, o.Name, o.Notes);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
//this will save the context as part of it's operations
|
||||
Search.ProcessUpdatedObjectKeywords(ct, LocaleIdFromContext.Id(HttpContext.Items), o.Id, AyaType.Widget, o.Name, o.Notes, o.Name);
|
||||
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
{
|
||||
@@ -352,9 +355,12 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
//Log now that we have the Id
|
||||
EventLogProcessor.AddEntry(new Event(biz.userId, o.Id, AyaType.Widget, AyaEvent.Created), ct);
|
||||
Search.ProcessNewObjectKeywords(ct, LocaleIdFromContext.Id(HttpContext.Items), o.Id, AyaType.Widget, o.Name, o.Notes);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
//this will save the context as part of it's operations
|
||||
Search.ProcessNewObjectKeywords(ct, LocaleIdFromContext.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));
|
||||
}
|
||||
@@ -406,9 +412,12 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
//Log
|
||||
EventLogProcessor.DeleteObject(biz.userId, AyaType.Widget, dbObj.Id, dbObj.Name, ct);
|
||||
Search.ProcessDeletedObjectKeywords(ct, dbObj.Id, AyaType.Widget);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
//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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user