From e19278cc2e4be15351275d50532edff997681971 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 1 Jun 2017 08:40:29 -0400 Subject: [PATCH] Store codepoints in a signed long --- Project-Unite/Controllers/APIController.cs | 4 ++-- Project-Unite/Models/IdentityModels.cs | 4 ++-- Project-Unite/Models/PongHighscore.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Project-Unite/Controllers/APIController.cs b/Project-Unite/Controllers/APIController.cs index 3ddb69a..5dd8065 100644 --- a/Project-Unite/Controllers/APIController.cs +++ b/Project-Unite/Controllers/APIController.cs @@ -59,7 +59,7 @@ public ActionResult SetPongCP(ulong id) var db = new ApplicationDbContext(); var t = db.OAuthTokens.FirstOrDefault(x => x.Id == token); var user = db.Users.FirstOrDefault(x => x.Id == t.UserId); - user.Pong_HighestCodepointsCashout = id; + user.Pong_HighestCodepointsCashout = (long)id; db.SaveChanges(); return new HttpStatusCodeResult(200); } @@ -134,7 +134,7 @@ public ActionResult SetCodepoints(ulong id) var db = new ApplicationDbContext(); var t = db.OAuthTokens.FirstOrDefault(x => x.Id == token); var user = db.Users.FirstOrDefault(x => x.Id == t.UserId); - user.Codepoints = id; + user.Codepoints = (long)id; db.SaveChanges(); return new HttpStatusCodeResult(200); } diff --git a/Project-Unite/Models/IdentityModels.cs b/Project-Unite/Models/IdentityModels.cs index 6783e7c..8b4ee89 100644 --- a/Project-Unite/Models/IdentityModels.cs +++ b/Project-Unite/Models/IdentityModels.cs @@ -42,7 +42,7 @@ public async Task GenerateUserIdentityAsync(UserManager