mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-13 13:22:28 +00:00
Major refactor and reorganization of types (#652)
* Start of reorganization and cleanup * Remove duplicate title id * Refactor types * Fix Release building * Move classes in /Types to a Types namespace * Fix compilation error (RoomVisualizerPage strikes again) * Fix bugs created from auto merge * Fix auto-merge compilation error * Changes from review/fix failed merge
This commit is contained in:
parent
c8120b3388
commit
f1c5ad4002
316 changed files with 1623 additions and 1518 deletions
|
@ -1,8 +1,5 @@
|
|||
using LBPUnion.ProjectLighthouse.Administration;
|
||||
using LBPUnion.ProjectLighthouse.PlayerData;
|
||||
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
|
||||
using LBPUnion.ProjectLighthouse.PlayerData.Reviews;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Level;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
@ -12,7 +9,6 @@ namespace LBPUnion.ProjectLighthouse.Servers.Website.Controllers.Moderator;
|
|||
[Route("moderation")]
|
||||
public class ModerationRemovalController : ControllerBase
|
||||
{
|
||||
|
||||
private readonly Database database;
|
||||
|
||||
public ModerationRemovalController(Database database)
|
||||
|
@ -69,7 +65,7 @@ public class ModerationRemovalController : ControllerBase
|
|||
case CommentType.Profile:
|
||||
canDelete = user.UserId == comment.PosterUserId || user.UserId == comment.TargetId;
|
||||
break;
|
||||
default: throw new ArgumentOutOfRangeException();
|
||||
default: throw new ArgumentOutOfRangeException(nameof(commentId));
|
||||
}
|
||||
|
||||
if (!canDelete && !user.IsModerator) return this.Redirect(callbackUrl ?? "~/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue