public async Task <IActionResult> UpdateTournament([FromRoute] int id, [FromBody] Tournament tournament) { try { if (id != tournament.TournamentId) { return(Conflict()); } if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await tournamentService.EditTournamentAsync(tournament); return(Accepted()); } catch (NotFoundInDatabaseException) { return(NotFound()); } catch (Exception e) { return(BadRequest(e.Message)); } }