forked from SoDOff-Project/sodoff
Basic Moderation System #1
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user