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)); }
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)); }