diff --git a/DatabaseMigrations/6.sql b/DatabaseMigrations/6.sql new file mode 100644 index 00000000..00046351 --- /dev/null +++ b/DatabaseMigrations/6.sql @@ -0,0 +1 @@ +ALTER TABLE Users ADD COLUMN PlanetHash text not null \ No newline at end of file diff --git a/ProjectLighthouse/Controllers/ResourcesController.cs b/ProjectLighthouse/Controllers/ResourcesController.cs index 224cbee3..1e647f3f 100644 --- a/ProjectLighthouse/Controllers/ResourcesController.cs +++ b/ProjectLighthouse/Controllers/ResourcesController.cs @@ -16,6 +16,7 @@ namespace ProjectLighthouse.Controllers { } [HttpPost("filterResources")] + [HttpPost("showNotUploaded")] public async Task FilterResources() { return this.Ok(await new StreamReader(Request.Body).ReadToEndAsync()); } diff --git a/ProjectLighthouse/Controllers/UserController.cs b/ProjectLighthouse/Controllers/UserController.cs index bd57f76e..244cec20 100644 --- a/ProjectLighthouse/Controllers/UserController.cs +++ b/ProjectLighthouse/Controllers/UserController.cs @@ -85,6 +85,10 @@ namespace ProjectLighthouse.Controllers { user.IconHash = await reader.GetValueAsync(); break; } + case "planets": { + user.PlanetHash = await reader.GetValueAsync(); + break; + } } break; case XmlNodeType.EndElement: diff --git a/ProjectLighthouse/Types/User.cs b/ProjectLighthouse/Types/User.cs index 37ec6640..fdd5b037 100644 --- a/ProjectLighthouse/Types/User.cs +++ b/ProjectLighthouse/Types/User.cs @@ -42,6 +42,9 @@ namespace ProjectLighthouse.Types { public int StaffChallengeGoldCount { get; set; } public int StaffChallengeSilverCount { get; set; } public int StaffChallengeBronzeCount { get; set; } + + public string PlanetHash { get; set; } + // [NotMapped] public readonly ClientsConnected ClientsConnected = new(); @@ -107,6 +110,7 @@ namespace ProjectLighthouse.Types { LbpSerializer.StringElement("staffChallengeGoldCount", this.StaffChallengeGoldCount) + LbpSerializer.StringElement("staffChallengeSilverCount", this.StaffChallengeSilverCount) + LbpSerializer.StringElement("staffChallengeBronzeCount", this.StaffChallengeBronzeCount) + + LbpSerializer.StringElement("planets", this.PlanetHash) + LbpSerializer.BlankElement("photos") + this.ClientsConnected.Serialize();