55 lines
1.3 KiB
Ruby
55 lines
1.3 KiB
Ruby
###############################################################
|
|
### A spike is something that you build to prove something. ###
|
|
### It's not meant to be used in the actual product. ###
|
|
###############################################################
|
|
|
|
class SpikesController < ApplicationController
|
|
|
|
include ClientHelper
|
|
|
|
def facebook_invite
|
|
|
|
end
|
|
|
|
def listen_in
|
|
|
|
if !current_user.admin
|
|
raise PermissionError "must be administrator"
|
|
end
|
|
|
|
#as_musician = false is the critical search criteria for sessions to list correctly
|
|
@music_sessions = ActiveMusicSession.index(current_user, as_musician: false)
|
|
|
|
render :layout => 'web'
|
|
end
|
|
|
|
def launch_app
|
|
render :layout => 'web'
|
|
end
|
|
|
|
def websocket
|
|
render :layout => false
|
|
end
|
|
|
|
def subscription
|
|
|
|
#Notification.send_reload(MessageFactory::ALL_NATIVE_CLIENTS)
|
|
|
|
Notification.send_subscription_message('test', '1', '{"msg": "oh hai 1"}')
|
|
Notification.send_subscription_message('test', '2', '{"msg": "oh hai 2"}')
|
|
render text: 'oh hai'
|
|
end
|
|
|
|
def download_jam_track
|
|
|
|
jamTrack = JamTrack.find(params[:jam_track_id])
|
|
jamTrackRight = jamTrack.right_for_user(current_user)
|
|
|
|
gon.jamTrackId = jamTrack.id
|
|
gon.jamTrackRightId = jamTrackRight.id
|
|
gon.switchState = params[:state]
|
|
|
|
render :layout => 'web'
|
|
end
|
|
end
|