Begin work on Unit Tests

This commit is contained in:
Li 2022-11-14 23:09:22 +13:00
parent cf7605c6c9
commit eaf1db1ee1
51 changed files with 3883 additions and 2101 deletions

View file

@ -4128,6 +4128,23 @@ namespace HISP.Server
return subscribedUntil;
}
}
public static void SetUserSubscriptionStatus(int playerId, int subscribedUntil)
{
using (DbConnection db = connectDb())
{
db.Open();
DbCommand sqlCommand = db.CreateCommand();
sqlCommand.CommandText = "UPDATE UserExt SET SubscribedUntil=@subscribedUntil WHERE Id=@playerId";
addWithValue(sqlCommand, "@subscribedUntil", subscribedUntil);
addWithValue(sqlCommand, "@playerId", playerId);
sqlCommand.Prepare();
sqlCommand.ExecuteNonQuery();
}
}
public static bool IsUserAdmin(int playerId)
{
using (DbConnection db = connectDb())