Пример #1
0
        public async Task <Survey> GetSurvey(Guid surveyId, Guid?userId)
        {
            var result = await _feedRepository.GetSurveyAsync(surveyId);

            if (result == null)
            {
                return(result);
            }
            if (userId.HasValue)
            {
                var like = await _feedRepository.GetFeedLikedDislikedAsync(surveyId, userId.Value);

                if (like != null)
                {
                    result.LikedType = like.LikeType;
                }
            }

            return(result);
        }