public async Task <IActionResult> AddCard(Guid accountId, string name, string cardHolderName, Guid departamentId) { if (name == null) { return(Ok(new { success = false })); } var account = await _accountService.GetAccountAsync(accountId, true); if (account == null || account.UserId != Guid.Parse(GetCurrentUserId())) { return(Ok(new { success = false })); } var user = await _userManager.FindByNameAsync(User.Identity.Name); var isSuccessful = await _accountService.AddCardAsync(account, name, cardHolderName, user.PhoneNumber); return(Ok(new { success = isSuccessful })); }