Create DeletedBy enum

This commit is contained in:
LumaLivy 2021-11-20 04:48:49 -05:00
commit ece00c218e
2 changed files with 10 additions and 1 deletions

View file

@ -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();

View file

@ -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)
}
}