diff --git a/ProjectLighthouse/Controllers/ReviewController.cs b/ProjectLighthouse/Controllers/ReviewController.cs index 4525a43d..690cdf2e 100644 --- a/ProjectLighthouse/Controllers/ReviewController.cs +++ b/ProjectLighthouse/Controllers/ReviewController.cs @@ -235,7 +235,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers if (review == null) return this.StatusCode(403, ""); review.Deleted = true; - review.DeletedBy = "level_author"; // other value is "moderator" + review.DeletedBy = DeletedBy.LevelAuthor; await this.database.SaveChangesAsync(); return this.Ok(); diff --git a/ProjectLighthouse/Types/DeletedBy.cs b/ProjectLighthouse/Types/DeletedBy.cs new file mode 100644 index 00000000..02d61ec0 --- /dev/null +++ b/ProjectLighthouse/Types/DeletedBy.cs @@ -0,0 +1,9 @@ +namespace LBPUnion.ProjectLighthouse.Types +{ + public static class DeletedBy + { + public static string Moderator { get => "moderator"; } + public static string LevelAuthor { get => "level_author"; } + // TODO: deletion types for comments (profile etc) + } +} \ No newline at end of file