Add TransferMoney Test
This commit is contained in:
@@ -34,6 +34,22 @@ namespace reallife_gamemode.Server.Extensions
|
||||
}
|
||||
}
|
||||
|
||||
public static UserBankAccount GetUserBankAccount(this User user, DatabaseContext context = null)
|
||||
{
|
||||
using (DatabaseContext dbContext = new DatabaseContext())
|
||||
if (context == null)
|
||||
{
|
||||
using (context = new DatabaseContext())
|
||||
{
|
||||
return context.UserBankAccounts.FirstOrDefault(u => u.UserId == user.Id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return context.UserBankAccounts.FirstOrDefault(u => u.UserId == user.Id);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsLoggedIn(this Client player)
|
||||
{
|
||||
return player.HasData("isLoggedIn") ? player.GetData("isLoggedIn") : false;
|
||||
|
||||
Reference in New Issue
Block a user