public async Task <IActionResult> GiveUpForMatch(int userId, int matchId) { if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value)) { return(Unauthorized()); } return(Ok(await _matchesService.GiveUpForMatch(userId, matchId))); }