mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 03:11:48 -05:00
Store codepoints in a signed long
This commit is contained in:
parent
c8eccc638b
commit
e19278cc2e
3 changed files with 5 additions and 5 deletions
|
@ -59,7 +59,7 @@ public ActionResult SetPongCP(ulong id)
|
||||||
var db = new ApplicationDbContext();
|
var db = new ApplicationDbContext();
|
||||||
var t = db.OAuthTokens.FirstOrDefault(x => x.Id == token);
|
var t = db.OAuthTokens.FirstOrDefault(x => x.Id == token);
|
||||||
var user = db.Users.FirstOrDefault(x => x.Id == t.UserId);
|
var user = db.Users.FirstOrDefault(x => x.Id == t.UserId);
|
||||||
user.Pong_HighestCodepointsCashout = id;
|
user.Pong_HighestCodepointsCashout = (long)id;
|
||||||
db.SaveChanges();
|
db.SaveChanges();
|
||||||
return new HttpStatusCodeResult(200);
|
return new HttpStatusCodeResult(200);
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ public ActionResult SetCodepoints(ulong id)
|
||||||
var db = new ApplicationDbContext();
|
var db = new ApplicationDbContext();
|
||||||
var t = db.OAuthTokens.FirstOrDefault(x => x.Id == token);
|
var t = db.OAuthTokens.FirstOrDefault(x => x.Id == token);
|
||||||
var user = db.Users.FirstOrDefault(x => x.Id == t.UserId);
|
var user = db.Users.FirstOrDefault(x => x.Id == t.UserId);
|
||||||
user.Codepoints = id;
|
user.Codepoints = (long)id;
|
||||||
db.SaveChanges();
|
db.SaveChanges();
|
||||||
return new HttpStatusCodeResult(200);
|
return new HttpStatusCodeResult(200);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<Applicat
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Pong_HighestLevel { get; set; }
|
public int Pong_HighestLevel { get; set; }
|
||||||
public ulong Pong_HighestCodepointsCashout { get; set; }
|
public long Pong_HighestCodepointsCashout { get; set; }
|
||||||
|
|
||||||
|
|
||||||
#region Privacy
|
#region Privacy
|
||||||
|
@ -155,7 +155,7 @@ public int TopicCount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ulong Codepoints { get; set; }
|
public long Codepoints { get; set; }
|
||||||
|
|
||||||
[AllowHtml]
|
[AllowHtml]
|
||||||
public string Bio { get; set; }
|
public string Bio { get; set; }
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace Project_Unite.Models
|
||||||
public class PongHighscore
|
public class PongHighscore
|
||||||
{
|
{
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
public ulong CodepointsCashout { get; set; }
|
public long CodepointsCashout { get; set; }
|
||||||
public int Level { get; set; }
|
public int Level { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue