class V1::MatchScoreboardController
Controller for match scoreboards
-
Renders a match with sets and games using V1::MatchScoreboardSerializer
-
Executes commands to play the match
Public Instance Methods
show()
click to toggle source
update()
click to toggle source
Execute an action by calling Match#play_match!
-
Params
-
Response
-
Serialized Match score
-
# File app/controllers/v1/match_scoreboard_controller.rb, line 29 def update request_params = match_scoreboard_params action = request_params[:action].to_sym version = request_params[:version] team_id = request_params[:team] player_id = request_params[:player] unless team_id play_params = {} play_params[:version] = version if version play_params[:opponent] = if team_id Team.find(team_id) if team_id elsif player_id Player.find(player_id) if player_id end play_match { @match.play_match!(action, play_params) } end