Basic Moderation System #1

Merged
Moonbase merged 6 commits from moderation into master 2025-03-02 16:05:53 -08:00
Showing only changes of commit 3f408bbae6 - Show all commits

View File

@ -13,7 +13,7 @@ public class ModerationService
this.ctx = ctx; this.ctx = ctx;
} }
public UserBan AddBanToViking(Viking viking, UserBanType userBanType, DateTime expirationDate = new DateTime()) public string AddBanToViking(Viking viking, UserBanType userBanType, DateTime expirationDate = new DateTime())
{ {
// get UTC time stamp of function execution // get UTC time stamp of function execution
DateTime timestamp = DateTime.UtcNow; DateTime timestamp = DateTime.UtcNow;
@ -30,8 +30,8 @@ public class ModerationService
viking.UserBans.Add(userBan); viking.UserBans.Add(userBan);
ctx.SaveChanges(); ctx.SaveChanges();
// return ban // return success message
return userBan; return "Success";
} }
public bool RemoveBanById(int id) public bool RemoveBanById(int id)