db access tracking

This commit is contained in:
Paul Schneider 2017-02-23 03:10:30 +01:00
commit bfc50d262d
63 changed files with 177 additions and 187 deletions

View file

@ -48,7 +48,7 @@ public class GCMController : Controller
alreadyRegisteredDevice.Platform = declaration.Platform;
alreadyRegisteredDevice.Version = declaration.Version;
_context.Update(alreadyRegisteredDevice);
_context.SaveChanges();
_context.SaveChanges(User.GetUserId());
}
else
{
@ -56,7 +56,7 @@ public class GCMController : Controller
declaration.DeclarationDate = DateTime.Now;
declaration.DeviceOwnerId = uid;
_context.GCMDevices.Add(declaration as GoogleCloudMobileDeclaration);
_context.SaveChanges();
_context.SaveChanges(User.GetUserId());
}
var latestActivityUpdate = _context.Activities.Max(a=>a.DateModified);
return Json(new {