public async Task <ActionResult <PostResponse> > UpdatePostConfig(int id, UpdatePostConfig req)
        {
            var result = await HandlePostOwner(id);

            if (result != null)
            {
                return(result);
            }
            var post = await _post.UpdatePostConfig(id, req.PostRestrictionType, req.AccessUsers, req.CanComment);

            return(Ok(new PostResponse(post)));
        }
示例#2
0
        public async Task <ActionResult <PostResponse> > UpdatePostConfig(int id, UpdatePostConfig req)
        {
            var post = await _repo.UpdatePostConfig(id, req.PostRestrictionType, req.AccessUsers, req.CanComment);

            return(Ok(new PostResponse(post)));
        }