public IActionResult DisLikePost(string token, int postId) { string referer = Request.Headers["Referer"].ToString(); var postDto = _postService.GetPostById(postId).Result; var userId = JwtDecoder.DecodeTokenToId(token); if (postDto.ApplicationUserId != userId) { return(Redirect(referer)); } DislikeDto dislikeDto = new DislikeDto { CurrentPost = postDto, ApplicationUserId = userId }; _disLikeService.CreateDisLike(dislikeDto); _postService.DislikePost(postDto.Id); return(Ok(postDto)); }