Update account/position and platform summary
This commit is contained in:
@@ -149,6 +149,25 @@ public class AccountService : IAccountService
|
||||
return account;
|
||||
}
|
||||
|
||||
public async Task<Account> GetAccountById(int accountId, bool hideSecrets = true, bool getBalance = false)
|
||||
{
|
||||
var account = await _accountRepository.GetAccountByIdAsync(accountId);
|
||||
|
||||
if (account == null)
|
||||
{
|
||||
throw new ArgumentException($"Account with ID '{accountId}' not found");
|
||||
}
|
||||
|
||||
await ManagePropertiesAsync(hideSecrets, getBalance, account);
|
||||
|
||||
if (account.User != null)
|
||||
{
|
||||
account.User = await _userRepository.GetUserByNameAsync(account.User.Name);
|
||||
}
|
||||
|
||||
return account;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Account>> GetAccounts(bool hideSecrets, bool getBalance)
|
||||
{
|
||||
return await GetAccountsAsync(hideSecrets, getBalance);
|
||||
|
||||
Reference in New Issue
Block a user