mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-27 15:38:39 +00:00
Create DeletedBy enum
This commit is contained in:
parent
d36a7d5765
commit
ece00c218e
2 changed files with 10 additions and 1 deletions
|
@ -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();
|
||||
|
|
9
ProjectLighthouse/Types/DeletedBy.cs
Normal file
9
ProjectLighthouse/Types/DeletedBy.cs
Normal 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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue