Пример #1
0
        public async Task <IActionResult> GeRecipientById(int recipientID)
        {
            var userEmail = GetUserEmail();

            if (userEmail == "error")
            {
                return(Unauthorized());
            }
            var recipient = await _recipientService.GetRecipientById(recipientID, userEmail);

            if (recipient == null)
            {
                return(NotFound(new { message = "Không tìm thấy !" }));
            }
            return(Ok(_mapper.Map <RecipientForUserDetailDto>(recipient)));
        }