From f46bd4fc8748754394e773e99af4fc6b0cc830f3 Mon Sep 17 00:00:00 2001 From: Slendy Date: Tue, 27 Sep 2022 21:52:56 -0500 Subject: [PATCH] Fix playlist descriptions and pirate bug --- .../Controllers/Slots/CollectionController.cs | 2 +- .../Pages/PirateSignupPage.cshtml.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/CollectionController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/CollectionController.cs index f712acf2..1184a603 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/CollectionController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/CollectionController.cs @@ -249,7 +249,7 @@ public class CollectionController : ControllerBase this.Request.Body.Position = 0; string bodyString = await new StreamReader(this.Request.Body).ReadToEndAsync(); - string rootElement = bodyString.Contains("levels") ? "levels" : "playlist"; + string rootElement = bodyString.StartsWith("") ? "playlist" : "levels"; XmlSerializer serializer = new(typeof(Playlist), new XmlRootAttribute(rootElement)); Playlist? playlist = (Playlist?)serializer.Deserialize(new StringReader(bodyString)); diff --git a/ProjectLighthouse.Servers.Website/Pages/PirateSignupPage.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/PirateSignupPage.cshtml.cs index a65827f4..3d88a60e 100644 --- a/ProjectLighthouse.Servers.Website/Pages/PirateSignupPage.cshtml.cs +++ b/ProjectLighthouse.Servers.Website/Pages/PirateSignupPage.cshtml.cs @@ -12,7 +12,7 @@ public class PirateSignupPage : BaseLayout public IActionResult OnGet() { User? user = this.Database.UserFromWebRequest(this.Request); - if (user == null) return this.RedirectToPage("/login"); + if (user == null) return this.Redirect("/login"); return this.Page(); }