mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-22 12:45:53 +12:00
Begin work on Unit Tests
This commit is contained in:
parent
cf7605c6c9
commit
eaf1db1ee1
51 changed files with 3883 additions and 2101 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue