diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index 0d444fa..1cfc05c 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -14,9 +14,7 @@ class MatchesController < ApplicationController def update new_state = match_params['state'] if new_state == 'finished' - # implement logic to move the winning team into the next stage - match_params['state'] = 'finished' # or 'team2_won' or 'undecided' - render json: {}, status: :not_implemented + PlayoffStageService.populate_match_below(@match) unless @match.group_match? end if @match.update(match_params) render json: @match