allow video tokens to last a long time
This commit is contained in:
parent
1279b16ec0
commit
0d82f6ee16
|
|
@ -820,10 +820,6 @@ class ApiMusicSessionsController < ApiController
|
||||||
return render json: { code: "invalid_token", message: "No token found for '#{params[:token]}'" }, status: :forbidden
|
return render json: { code: "invalid_token", message: "No token found for '#{params[:token]}'" }, status: :forbidden
|
||||||
end
|
end
|
||||||
|
|
||||||
if token.expired_at < Time.now.utc
|
|
||||||
return render json: {code: "expired_token", message: "The token has expired" }, status: :forbidden
|
|
||||||
end
|
|
||||||
|
|
||||||
if token.token == Rails.application.config.video_open_room
|
if token.token == Rails.application.config.video_open_room
|
||||||
return render json: { name: token.user.name, user_id: token.user.id }, status: 200
|
return render json: { name: token.user.name, user_id: token.user.id }, status: 200
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue