change response in `AddBanToViking`

This commit is contained in:
Alan Moon 2025-03-02 15:58:42 -08:00
parent 3ff5c729e7
commit 3f408bbae6

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)