This commit is contained in:
@@ -85,9 +85,7 @@ namespace AyaNova.Api.Controllers
|
||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
}
|
||||
|
||||
//Log
|
||||
EventLogProcessor.AddEntry(new Event(biz.userId, o.Id, WidgetBiz.BizType, AyaEvent.Retrieved), ct);
|
||||
ct.SaveChanges();
|
||||
|
||||
return Ok(new ApiOkResponse(o));
|
||||
}
|
||||
|
||||
@@ -209,7 +207,7 @@ namespace AyaNova.Api.Controllers
|
||||
try
|
||||
{
|
||||
//Log
|
||||
EventLogProcessor.AddEntry(new Event(biz.userId, o.Id, WidgetBiz.BizType, AyaEvent.Modified), ct);
|
||||
EventLogProcessor.AddEntry(new Event(biz.UserId, o.Id, WidgetBiz.BizType, AyaEvent.Modified), ct);
|
||||
await ct.SaveChangesAsync();
|
||||
Search.ProcessUpdatedObjectKeywords(ct, UserLocaleIdFromContext.Id(HttpContext.Items), o.Id, WidgetBiz.BizType, o.Name, o.Notes, o.Name);
|
||||
}
|
||||
@@ -286,7 +284,7 @@ namespace AyaNova.Api.Controllers
|
||||
try
|
||||
{
|
||||
//Log
|
||||
EventLogProcessor.AddEntry(new Event(biz.userId, o.Id, WidgetBiz.BizType, AyaEvent.Modified), ct);
|
||||
EventLogProcessor.AddEntry(new Event(biz.UserId, o.Id, WidgetBiz.BizType, AyaEvent.Modified), ct);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
//this will save the context as part of it's operations
|
||||
@@ -354,7 +352,7 @@ namespace AyaNova.Api.Controllers
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
//Log now that we have the Id
|
||||
EventLogProcessor.AddEntry(new Event(biz.userId, o.Id, WidgetBiz.BizType, AyaEvent.Created), ct);
|
||||
EventLogProcessor.AddEntry(new Event(biz.UserId, o.Id, WidgetBiz.BizType, AyaEvent.Created), ct);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
//this will save the context as part of it's operations
|
||||
@@ -412,7 +410,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Log
|
||||
EventLogProcessor.DeleteObject(biz.userId, WidgetBiz.BizType, dbObj.Id, dbObj.Name, ct);
|
||||
EventLogProcessor.DeleteObject(biz.UserId, WidgetBiz.BizType, dbObj.Id, dbObj.Name, ct);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
//This will directly execute and is not part of context for saving purposes
|
||||
|
||||
Reference in New Issue
Block a user