lib/evostream/event/events/out_stream_created.rb in evostream-event-0.1.1 vs lib/evostream/event/events/out_stream_created.rb in evostream-event-0.1.2.pre.20

- old
+ new

@@ -8,18 +8,22 @@ super(id_flux) @request = request end def execute - super - stream = what_flux.constantize - model.streams.push(stream.new(config_id: ex_config, flux: ex_flux)) + stream_flux = what_flux.constantize + model.streams.push(stream_flux.new(config_id: ex_config, flux: ex_flux)) + model.save end private def what_flux - @request.key?('hlsSettings') ? 'Hls' : 'Dash' + hls? ? 'Hls' : 'Dash' + end + + def hls? + @request.key?(:hlsSettings) || @request.key?('hlsSettings') end def name_flux case what_flux when 'Hls' then 'playlistName'