diff --git a/ProjectLighthouse/Controllers/ResourcesController.cs b/ProjectLighthouse/Controllers/ResourcesController.cs index adb7734b..87ffed95 100644 --- a/ProjectLighthouse/Controllers/ResourcesController.cs +++ b/ProjectLighthouse/Controllers/ResourcesController.cs @@ -14,8 +14,8 @@ using IOFile = System.IO.File; namespace LBPUnion.ProjectLighthouse.Controllers { [ApiController] - [Route("LITTLEBIGPLANETPS3_XML/")] [Produces("text/xml")] + [Route("LITTLEBIGPLANETPS3_XML")] public class ResourcesController : ControllerBase { [HttpPost("showModerated")] @@ -39,6 +39,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers return this.Ok(LbpSerializer.StringElement("resources", resources)); } + [HttpGet("/gameAssets/{hash}")] [HttpGet("r/{hash}")] public IActionResult GetResource(string hash) { diff --git a/ProjectLighthouse/Pages/ExternalAuth/LandingPage.cshtml b/ProjectLighthouse/Pages/LandingPage.cshtml similarity index 87% rename from ProjectLighthouse/Pages/ExternalAuth/LandingPage.cshtml rename to ProjectLighthouse/Pages/LandingPage.cshtml index 5da7834c..f320a553 100644 --- a/ProjectLighthouse/Pages/ExternalAuth/LandingPage.cshtml +++ b/ProjectLighthouse/Pages/LandingPage.cshtml @@ -1,5 +1,5 @@ @page "/" -@model LBPUnion.ProjectLighthouse.Pages.ExternalAuth.LandingPage +@model LBPUnion.ProjectLighthouse.Pages.LandingPage @{ Layout = "Layouts/BaseLayout"; diff --git a/ProjectLighthouse/Pages/ExternalAuth/LandingPage.cshtml.cs b/ProjectLighthouse/Pages/LandingPage.cshtml.cs similarity index 90% rename from ProjectLighthouse/Pages/ExternalAuth/LandingPage.cshtml.cs rename to ProjectLighthouse/Pages/LandingPage.cshtml.cs index 806731fb..1edb223a 100644 --- a/ProjectLighthouse/Pages/ExternalAuth/LandingPage.cshtml.cs +++ b/ProjectLighthouse/Pages/LandingPage.cshtml.cs @@ -5,7 +5,7 @@ using LBPUnion.ProjectLighthouse.Helpers; using LBPUnion.ProjectLighthouse.Pages.Layouts; using Microsoft.AspNetCore.Mvc; -namespace LBPUnion.ProjectLighthouse.Pages.ExternalAuth +namespace LBPUnion.ProjectLighthouse.Pages { public class LandingPage : BaseLayout { diff --git a/ProjectLighthouse/Pages/ExternalAuth/LoginForm.cshtml b/ProjectLighthouse/Pages/LoginForm.cshtml similarity index 92% rename from ProjectLighthouse/Pages/ExternalAuth/LoginForm.cshtml rename to ProjectLighthouse/Pages/LoginForm.cshtml index 18888d32..83d3dbf0 100644 --- a/ProjectLighthouse/Pages/ExternalAuth/LoginForm.cshtml +++ b/ProjectLighthouse/Pages/LoginForm.cshtml @@ -1,5 +1,5 @@ @page "/login" -@model LBPUnion.ProjectLighthouse.Pages.ExternalAuth.LoginForm +@model LBPUnion.ProjectLighthouse.Pages.LoginForm @{ Layout = "Layouts/BaseLayout"; diff --git a/ProjectLighthouse/Pages/ExternalAuth/LoginForm.cshtml.cs b/ProjectLighthouse/Pages/LoginForm.cshtml.cs similarity index 88% rename from ProjectLighthouse/Pages/ExternalAuth/LoginForm.cshtml.cs rename to ProjectLighthouse/Pages/LoginForm.cshtml.cs index 7ba7d451..674eb803 100644 --- a/ProjectLighthouse/Pages/ExternalAuth/LoginForm.cshtml.cs +++ b/ProjectLighthouse/Pages/LoginForm.cshtml.cs @@ -7,7 +7,7 @@ using LBPUnion.ProjectLighthouse.Types; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace LBPUnion.ProjectLighthouse.Pages.ExternalAuth +namespace LBPUnion.ProjectLighthouse.Pages { public class LoginForm : BaseLayout { @@ -19,9 +19,9 @@ namespace LBPUnion.ProjectLighthouse.Pages.ExternalAuth [UsedImplicitly] public async Task OnGet([FromQuery] string username, [FromQuery] string password) { - WasLoginRequest = !string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password); + this.WasLoginRequest = !string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password); - if (WasLoginRequest) + if (this.WasLoginRequest) { User? user = await this.Database.Users.FirstOrDefaultAsync(u => u.Username == username); if (user == null) return this.StatusCode(403, ""); diff --git a/ProjectLighthouse/Pages/ExternalAuth/LogoutPage.cshtml b/ProjectLighthouse/Pages/LogoutPage.cshtml similarity index 79% rename from ProjectLighthouse/Pages/ExternalAuth/LogoutPage.cshtml rename to ProjectLighthouse/Pages/LogoutPage.cshtml index d17124cb..ac65ce91 100644 --- a/ProjectLighthouse/Pages/ExternalAuth/LogoutPage.cshtml +++ b/ProjectLighthouse/Pages/LogoutPage.cshtml @@ -1,5 +1,5 @@ @page "/logout" -@model LBPUnion.ProjectLighthouse.Pages.ExternalAuth.LogoutPage +@model LBPUnion.ProjectLighthouse.Pages.LogoutPage @{ Layout = "Layouts/BaseLayout"; diff --git a/ProjectLighthouse/Pages/ExternalAuth/LogoutPage.cshtml.cs b/ProjectLighthouse/Pages/LogoutPage.cshtml.cs similarity index 92% rename from ProjectLighthouse/Pages/ExternalAuth/LogoutPage.cshtml.cs rename to ProjectLighthouse/Pages/LogoutPage.cshtml.cs index 374bb057..792947be 100644 --- a/ProjectLighthouse/Pages/ExternalAuth/LogoutPage.cshtml.cs +++ b/ProjectLighthouse/Pages/LogoutPage.cshtml.cs @@ -4,7 +4,7 @@ using LBPUnion.ProjectLighthouse.Pages.Layouts; using LBPUnion.ProjectLighthouse.Types; using Microsoft.AspNetCore.Mvc; -namespace LBPUnion.ProjectLighthouse.Pages.ExternalAuth +namespace LBPUnion.ProjectLighthouse.Pages { public class LogoutPage : BaseLayout { diff --git a/ProjectLighthouse/Pages/PhotosPage.cshtml b/ProjectLighthouse/Pages/PhotosPage.cshtml new file mode 100644 index 00000000..ee872eea --- /dev/null +++ b/ProjectLighthouse/Pages/PhotosPage.cshtml @@ -0,0 +1,8 @@ +@page +@model LBPUnion.ProjectLighthouse.Pages.PhotosPage + +@{ + Layout = "Layouts/BaseLayout"; +} + +

Photos

\ No newline at end of file diff --git a/ProjectLighthouse/Pages/PhotosPage.cshtml.cs b/ProjectLighthouse/Pages/PhotosPage.cshtml.cs new file mode 100644 index 00000000..1ff35d35 --- /dev/null +++ b/ProjectLighthouse/Pages/PhotosPage.cshtml.cs @@ -0,0 +1,10 @@ +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace LBPUnion.ProjectLighthouse.Pages +{ + public class PhotosPage : PageModel + { + public void OnGet() + {} + } +} \ No newline at end of file diff --git a/ProjectLighthouse/Pages/ExternalAuth/RegisterForm.cshtml b/ProjectLighthouse/Pages/RegisterForm.cshtml similarity index 94% rename from ProjectLighthouse/Pages/ExternalAuth/RegisterForm.cshtml rename to ProjectLighthouse/Pages/RegisterForm.cshtml index 1064aa92..b5385f17 100644 --- a/ProjectLighthouse/Pages/ExternalAuth/RegisterForm.cshtml +++ b/ProjectLighthouse/Pages/RegisterForm.cshtml @@ -1,5 +1,5 @@ @page "/register" -@model LBPUnion.ProjectLighthouse.Pages.ExternalAuth.RegisterForm +@model LBPUnion.ProjectLighthouse.Pages.RegisterForm @{ Layout = "Layouts/BaseLayout"; diff --git a/ProjectLighthouse/Pages/ExternalAuth/RegisterForm.cshtml.cs b/ProjectLighthouse/Pages/RegisterForm.cshtml.cs similarity index 95% rename from ProjectLighthouse/Pages/ExternalAuth/RegisterForm.cshtml.cs rename to ProjectLighthouse/Pages/RegisterForm.cshtml.cs index 6fb36a90..5e5347ca 100644 --- a/ProjectLighthouse/Pages/ExternalAuth/RegisterForm.cshtml.cs +++ b/ProjectLighthouse/Pages/RegisterForm.cshtml.cs @@ -7,7 +7,7 @@ using LBPUnion.ProjectLighthouse.Types; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace LBPUnion.ProjectLighthouse.Pages.ExternalAuth +namespace LBPUnion.ProjectLighthouse.Pages { public class RegisterForm : BaseLayout { @@ -22,7 +22,7 @@ namespace LBPUnion.ProjectLighthouse.Pages.ExternalAuth { this.WasRegisterRequest = !string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password) && !string.IsNullOrEmpty(confirmPassword); - if (WasRegisterRequest) + if (this.WasRegisterRequest) { if (password != confirmPassword) return this.BadRequest();