mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-16 14:42:28 +00:00
Allow moderators to dismiss reports
This commit is contained in:
parent
e67abe0164
commit
c6ddeaf154
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ public class AdminReportController : ControllerBase
|
|||
public async Task<IActionResult> DismissReport([FromRoute] int id)
|
||||
{
|
||||
User? user = this.database.UserFromWebRequest(this.Request);
|
||||
if (user == null || !user.IsAdmin) return this.StatusCode(403, "");
|
||||
if (user == null || !user.IsModerator) return this.StatusCode(403, "");
|
||||
|
||||
GriefReport? report = await this.database.Reports.FirstOrDefaultAsync(r => r.ReportId == id);
|
||||
if (report == null) return this.NotFound();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue