public async Task <IActionResult> GetRecipientsByUserId() { try { var userEmail = GetUserEmail(); if (userEmail == "error") { return(Unauthorized()); } var recipients = await _recipientService.GetRecipientsByEmail(userEmail); var recipientsForReturn = _mapper.Map <IEnumerable <Recipient>, IEnumerable <RecipientForUserListDto> >(recipients); return(Ok(new { data = recipientsForReturn })); } catch (System.Exception) { return(BadRequest()); } }