Ejemplo n.º 1
0
        public async Task <IActionResult> GetUserEmailAccounts()
        {
            try {
                var userEmailAccounts = await _emailAccountService.GetAllWIthUserByUserIdAsync(UserId);

                if (userEmailAccounts.Count() > 0)
                {
                    return(Json(userEmailAccounts));
                }
                return(Ok("Lack of email accounts"));
            } catch (Exception e) {
                return(BadRequest(e.Message));
            }
        }