mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-19 11:41:30 +00:00
Allow user to modify their planet
This commit is contained in:
parent
7a7c68fc91
commit
115c46ead0
4 changed files with 10 additions and 0 deletions
1
DatabaseMigrations/6.sql
Normal file
1
DatabaseMigrations/6.sql
Normal file
|
@ -0,0 +1 @@
|
|||
ALTER TABLE Users ADD COLUMN PlanetHash text not null
|
|
@ -16,6 +16,7 @@ namespace ProjectLighthouse.Controllers {
|
|||
}
|
||||
|
||||
[HttpPost("filterResources")]
|
||||
[HttpPost("showNotUploaded")]
|
||||
public async Task<IActionResult> FilterResources() {
|
||||
return this.Ok(await new StreamReader(Request.Body).ReadToEndAsync());
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue