Update account/position and platform summary

This commit is contained in:
2025-09-26 01:18:59 +07:00
parent b2e38811ed
commit bcfeb693ce
32 changed files with 3301 additions and 151 deletions

View File

@@ -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);