Exemplo n.º 1
0
        public async Task <IActionResult> GetUpvotes(int userId)
        {
            if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value))
            {
                return(Unauthorized());
            }
            var upvotes = await _votesRepo.GetUpvotesForUser(userId);

            return(Ok(upvotes));
        }