예제 #1
0
        public IActionResult ListAccounts()
        {
            var id = int.Parse(User.Claims.First(i => i.Type == "UserId").Value);

            try
            {
                var accounts = _accountBusiness.GetAccountsWithBalance(id);
                return(Ok(accounts));
            }
            catch
            {
                throw new CustomException(500, "Error interno del servidor");
            }
        }