This commit is contained in:
2018-09-27 17:15:42 +00:00
parent a30d0f11cd
commit 03b21d29b4
17 changed files with 135 additions and 51 deletions

View File

@@ -239,7 +239,7 @@ namespace AyaNova.Api.Controllers
});
//Log
EventLogProcessor.AddEntry(new Event(UserId, attachToObject.ObjectId, attachToObject.ObjectType, AyaEvent.AttachmentCreate, v.DisplayFileName), ct);
EventLogProcessor.AddEntryToContextNoSave(new Event(UserId, attachToObject.ObjectId, attachToObject.ObjectType, AyaEvent.AttachmentCreate, v.DisplayFileName), ct);
ct.SaveChanges();
}
}
@@ -306,7 +306,7 @@ namespace AyaNova.Api.Controllers
FileUtil.deleteFileAttachment(dbObj, ct);
//Log
EventLogProcessor.AddEntry(new Event(UserId, dbObj.AttachToObjectId, dbObj.AttachToObjectType, AyaEvent.AttachmentDelete, dbObj.DisplayFileName), ct);
EventLogProcessor.AddEntryToContextNoSave(new Event(UserId, dbObj.AttachToObjectId, dbObj.AttachToObjectType, AyaEvent.AttachmentDelete, dbObj.DisplayFileName), ct);
ct.SaveChanges();
return NoContent();
}
@@ -385,7 +385,7 @@ namespace AyaNova.Api.Controllers
}
//Log
EventLogProcessor.AddEntry(new Event(UserId, dbObj.AttachToObjectId, dbObj.AttachToObjectType, AyaEvent.AttachmentDownload, dbObj.DisplayFileName), ct);
EventLogProcessor.AddEntryToContextNoSave(new Event(UserId, dbObj.AttachToObjectId, dbObj.AttachToObjectType, AyaEvent.AttachmentDownload, dbObj.DisplayFileName), ct);
ct.SaveChanges();
return PhysicalFile(filePath, mimetype, dbObj.DisplayFileName);