diff --git a/web/app/controllers/api_live_streams_controller.rb b/web/app/controllers/api_live_streams_controller.rb index b45092962..f21776107 100644 --- a/web/app/controllers/api_live_streams_controller.rb +++ b/web/app/controllers/api_live_streams_controller.rb @@ -44,4 +44,10 @@ class ApiLiveStreamsController < ApiController render "api_live_streams/show", :layout => nil end + def stream_started + AdminMailer.ugly({to:'david@jamkazam.com', cc:'seth@jamkazam.com,peter@jamkazam.com', body: params.to_s, subject: 'Live Stream Started!'}).deliver_now + + render json: {}, :status => :ok + end + end diff --git a/web/config/routes.rb b/web/config/routes.rb index bdba4420c..ec966c2b8 100644 --- a/web/config/routes.rb +++ b/web/config/routes.rb @@ -235,6 +235,7 @@ Rails.application.routes.draw do match '/live_streams' => 'api_live_streams#index', :via => :get match '/live_streams/claim' => 'api_live_streams#claim', :via => :post match '/live_streams/:slug' => 'api_live_streams#show', :via => :get + match '/live_streams/stream_started' => 'api_live_streams#stream_started', :via => :post # music sessions match '/sessions/:id/participants/legacy' => 'api_music_sessions#participant_create_legacy', :via => :post # can be removed when new Create Session comes in