常用方法
常用方法
常用方法
常用方法
public IActionResult Post(ReviewPostCharacter reviewPostCharacter) { var currentUserProfile = GetCurrentUserProfile(); var currentPost = _reviewPostRepository.GetById(reviewPostCharacter.ReviewPostId); if (currentUserProfile.Id != currentPost.UserProfileId) { return(Unauthorized()); } _characterRepository.AddCharacterToPost(reviewPostCharacter); return(CreatedAtAction("Get", new { id = reviewPostCharacter.Id }, reviewPostCharacter)); }