예제 #1
0
        public IActionResult Post(PostTag postTag)
        {
            var post = _repo.GetById(postTag.PostId);
            var user = GetCurrentUserProfile();

            if (user.Id != post.UserProfileId && user.UserTypeId != 1)
            {
                return(Unauthorized());
            }
            _repo.AddTagToPost(postTag);
            return(NoContent());
        }