turniere-backend/app/services/tournament_matches_broadcas...

15 lines
337 B
Ruby

# frozen_string_literal: true
class TournamentMatchesBroadcastPayload
class << self
def build(tournament, state: nil)
{
type: 'tournament_matches.updated',
tournament_id: tournament.id,
state: state,
matches: TournamentMatchesPayload.build(tournament, state: state)
}
end
end
end