VRFS-1333 removed add_play; now lives in user/api
This commit is contained in:
parent
721840172c
commit
386fcbd9a3
|
|
@ -1,6 +1,6 @@
|
|||
class ApiRecordingsController < ApiController
|
||||
|
||||
before_filter :api_signed_in_user, :except => [ :add_like, :add_play ]
|
||||
before_filter :api_signed_in_user, :except => [ :add_like ]
|
||||
before_filter :look_up_recording, :only => [ :show, :stop, :claim, :discard, :keep ]
|
||||
before_filter :parse_filename, :only => [ :download, :upload_next_part, :upload_sign, :upload_part_complete, :upload_complete ]
|
||||
|
||||
|
|
@ -146,29 +146,6 @@ class ApiRecordingsController < ApiController
|
|||
end
|
||||
end
|
||||
|
||||
def add_play
|
||||
if params[:id].blank?
|
||||
render :json => { :message => "Playable ID is required" }, :status => 400
|
||||
return
|
||||
end
|
||||
|
||||
play = PlayablePlay.new
|
||||
play.playable_id = params[:id]
|
||||
play.playable_type = params[:playable_type]
|
||||
play.player_id = params[:user_id]
|
||||
play.claimed_recording_id = params[:claimed_recording_id]
|
||||
play.ip_address = request.remote_ip
|
||||
play.save
|
||||
|
||||
if play.errors.any?
|
||||
render :json => { :message => "Unexpected error occurred" }, :status => 500
|
||||
return
|
||||
else
|
||||
render :json => {}, :status => 201
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
# discard will tell the server the user has no interest in the recording
|
||||
def discard
|
||||
@recording.discard(current_user)
|
||||
|
|
|
|||
Loading…
Reference in New Issue