Example #1
0
        public IEnumerable <CommentItemDto> GetComments(int pushId)
        {
            var anunt = _anuntService.GetAnuntWithRole(pushId);

            if (User.IsInRole(anunt.Role))
            {
                var result = _commentsService.GetComments(pushId);
                return(result);
            }

            return(null);
        }
Example #2
0
        public AnuntDto GetAnunt(int pushId)
        {
            var result = _anuntService.GetAnuntWithRole(pushId);

            if (User.IsInRole(result.Role))
            {
                return(result);
            }

            return(null);
        }