public async Task <IActionResult> GetDownvotes(int userId) { if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value)) { return(Unauthorized()); } var downvotes = await _votesRepo.GetDownvotesForUser(userId); return(Ok(downvotes)); }
public async Task <IActionResult> GetDownvotes(int userId) { if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value)) { return(Unauthorized()); } var downvotes = await _votesRepo.GetDownvotesForUser(userId); return(Ok(downvotes)); }