Пример #1
0
        public async Task <IActionResult> LikeTweet(int tweetId)
        {
            string userId = User.FindFirstValue(ClaimTypes.NameIdentifier); // will give the user's userId

            _tweetRepository.AddLikeToTweet(tweetId, userId);

            return(Redirect(Request.Headers["Referer"].ToString()));
        }