mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-04 10:58:38 +00:00
Rename /modPanel
to /moderation
This commit is contained in:
parent
f04a8000cf
commit
a6f077725a
11 changed files with 32 additions and 39 deletions
|
@ -28,7 +28,7 @@ public class ReportsPage : BaseLayout
|
|||
{
|
||||
User? user = this.Database.UserFromWebRequest(this.Request);
|
||||
if (user == null) return this.Redirect("~/login");
|
||||
if (!user.IsAdmin) return this.NotFound();
|
||||
if (!user.IsModerator) return this.NotFound();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(name)) name = "";
|
||||
|
||||
|
@ -40,7 +40,7 @@ public class ReportsPage : BaseLayout
|
|||
this.PageAmount = Math.Max(1, (int)Math.Ceiling((double)this.ReportCount / ServerStatics.PageSize));
|
||||
|
||||
if (this.PageNumber < 0 || this.PageNumber >= this.PageAmount)
|
||||
return this.Redirect($"/modPanel/reports/{Math.Clamp(this.PageNumber, 0, this.PageAmount - 1)}");
|
||||
return this.Redirect($"/moderation/reports/{Math.Clamp(this.PageNumber, 0, this.PageAmount - 1)}");
|
||||
|
||||
this.Reports = await this.Database.Reports.Include(r => r.ReportingPlayer)
|
||||
.Where(r => r.ReportingPlayer.Username.Contains(this.SearchValue))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue