mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-22 01:02:28 +00:00
Use JsonPropertyName attribute to comply with C# naming styles
This commit is contained in:
parent
de9c0eecd8
commit
65e35a6122
2 changed files with 8 additions and 6 deletions
|
@ -143,7 +143,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers
|
||||||
// Sometimes the update gets called periodically as pin progress updates via playing,
|
// Sometimes the update gets called periodically as pin progress updates via playing,
|
||||||
// may not affect equipped profile pins however, so check before setting it.
|
// may not affect equipped profile pins however, so check before setting it.
|
||||||
string currentPins = user.Pins;
|
string currentPins = user.Pins;
|
||||||
string newPins = string.Join(",", pinJson.profile_pins);
|
string newPins = string.Join(",", pinJson.ProfilePins);
|
||||||
if (!String.Equals(currentPins,newPins)) {
|
if (!String.Equals(currentPins,newPins)) {
|
||||||
user.Pins = newPins;
|
user.Pins = newPins;
|
||||||
await this.database.SaveChangesAsync();
|
await this.database.SaveChangesAsync();
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
using LBPUnion.ProjectLighthouse.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace LBPUnion.ProjectLighthouse.Types.Profiles
|
namespace LBPUnion.ProjectLighthouse.Types.Profiles
|
||||||
{
|
{
|
||||||
public class Pins
|
public class Pins
|
||||||
{
|
{
|
||||||
public long[] progress { get; set; }
|
[JsonPropertyName("progress")]
|
||||||
public long[] awards { get; set; }
|
public long[] Progress { get; set; }
|
||||||
public long[] profile_pins { get; set; }
|
[JsonPropertyName("awards")]
|
||||||
|
public long[] Awards { get; set; }
|
||||||
|
[JsonPropertyName("profile_pins")]
|
||||||
|
public long[] ProfilePins { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue