diff --git a/.run/Lighthouse Website.run.xml b/.run/Lighthouse Website.run.xml
index 4734f1b8..045ee0d6 100644
--- a/.run/Lighthouse Website.run.xml
+++ b/.run/Lighthouse Website.run.xml
@@ -4,6 +4,9 @@
+
+
+
diff --git a/.run/Lighthouse.run.xml b/.run/Lighthouse.run.xml
deleted file mode 100644
index 9c9d716a..00000000
--- a/.run/Lighthouse.run.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ProjectLighthouse.Servers.Website/Controllers/Admin/AdminReportController.cs b/ProjectLighthouse.Servers.Website/Controllers/Admin/AdminReportController.cs
index d394a82e..1748f1e3 100644
--- a/ProjectLighthouse.Servers.Website/Controllers/Admin/AdminReportController.cs
+++ b/ProjectLighthouse.Servers.Website/Controllers/Admin/AdminReportController.cs
@@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore;
namespace LBPUnion.ProjectLighthouse.Servers.Website.Controllers.Admin;
[ApiController]
-[Route("/modPanel/report/{id:int}")]
+[Route("/moderation/report/{id:int}")]
public class AdminReportController : ControllerBase
{
private readonly Database database;
@@ -48,7 +48,7 @@ public class AdminReportController : ControllerBase
await this.database.SaveChangesAsync();
- return this.Redirect("~/modPanel/reports/0");
+ return this.Redirect("~/moderation/reports/0");
}
[HttpGet("dismiss")]
@@ -73,6 +73,6 @@ public class AdminReportController : ControllerBase
await this.database.SaveChangesAsync();
- return this.Redirect("~/modPanel/reports/0");
+ return this.Redirect("~/moderation/reports/0");
}
}
\ No newline at end of file
diff --git a/ProjectLighthouse.Servers.Website/Pages/Admin/AdminPanelPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/Admin/AdminPanelPage.cshtml
index c5197ef8..8c007fc5 100644
--- a/ProjectLighthouse.Servers.Website/Pages/Admin/AdminPanelPage.cshtml
+++ b/ProjectLighthouse.Servers.Website/Pages/Admin/AdminPanelPage.cshtml
@@ -41,7 +41,7 @@ else
}
}
-
+
View Mod Panel
diff --git a/ProjectLighthouse.Servers.Website/Pages/Admin/ModPanelPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/Admin/ModPanelPage.cshtml
index 293646f1..af49a502 100644
--- a/ProjectLighthouse.Servers.Website/Pages/Admin/ModPanelPage.cshtml
+++ b/ProjectLighthouse.Servers.Website/Pages/Admin/ModPanelPage.cshtml
@@ -1,4 +1,5 @@
-@page "/modPanel"
+@page "/moderation"
+@using System.Diagnostics
@using LBPUnion.ProjectLighthouse.Administration
@using LBPUnion.ProjectLighthouse.Extensions
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.Admin.ModPanelPage
@@ -6,8 +7,19 @@
@{
Layout = "Layouts/BaseLayout";
Model.Title = "Moderation Panel";
+
+ if (Model.User == null) throw new ArgumentNullException($"{nameof(Model)}.{nameof(User)}");
+
+ // Technically, this should never happen but I'm going to handle it anyways.
+ if (!Model.User.IsModerator)
+ {
+ if(Debugger.IsAttached) Debugger.Break();
+ throw new Exception("Tried to render mod panel with user whose not mod somehow???");
+ }
}
+
Hello, @Model.User.Username.
+
@if (!this.Request.IsMobile())
{
diff --git a/ProjectLighthouse.Servers.Website/Pages/Admin/ModPanelPage.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/Admin/ModPanelPage.cshtml.cs
index d722eb02..6b6893d0 100644
--- a/ProjectLighthouse.Servers.Website/Pages/Admin/ModPanelPage.cshtml.cs
+++ b/ProjectLighthouse.Servers.Website/Pages/Admin/ModPanelPage.cshtml.cs
@@ -19,8 +19,8 @@ public class ModPanelPage : BaseLayout
if (user == null) return this.Redirect("~/login");
if (!user.IsModerator) return this.NotFound();
- this.Statistics.Add(new AdminPanelStatistic("Reports", await StatisticsHelper.ReportCount(), "/modPanel/reports/0"));
- this.Statistics.Add(new AdminPanelStatistic("Cases", await StatisticsHelper.CaseCount(), "/modPanel/cases/0"));
+ this.Statistics.Add(new AdminPanelStatistic("Reports", await StatisticsHelper.ReportCount(), "/moderation/reports/0"));
+ this.Statistics.Add(new AdminPanelStatistic("Cases", await StatisticsHelper.CaseCount(), "/moderation/cases/0"));
return this.Page();
}
diff --git a/ProjectLighthouse.Servers.Website/Pages/Admin/ReportsPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/Admin/ReportsPage.cshtml
index ebec1e28..ecbe7ac8 100644
--- a/ProjectLighthouse.Servers.Website/Pages/Admin/ReportsPage.cshtml
+++ b/ProjectLighthouse.Servers.Website/Pages/Admin/ReportsPage.cshtml
@@ -1,4 +1,4 @@
-@page "/modPanel/reports/{pageNumber:int}"
+@page "/moderation/reports/{pageNumber:int}"
@using LBPUnion.ProjectLighthouse.Administration.Reports
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.Admin.ReportsPage
@@ -9,7 +9,7 @@
There are @Model.ReportCount total reports.
-