Fetch/store Web App metadata and icons, finish RS integration #153
@ -3,13 +3,10 @@ class Services::RsAuthsController < Services::BaseController
|
||||
before_action :require_feature_enabled
|
||||
before_action :require_service_available
|
||||
# before_action :require_service_enabled
|
||||
before_action :find_rs_auth
|
||||
|
||||
def destroy
|
||||
if auth = current_user.remote_storage_authorizations.find(params[:id])
|
||||
auth.destroy!
|
||||
else
|
||||
http_status :not_found
|
||||
end
|
||||
@auth.destroy!
|
||||
|
||||
respond_to do |format|
|
||||
format.html do redirect_to services_storage_url, flash: {
|
||||
@ -21,8 +18,7 @@ class Services::RsAuthsController < Services::BaseController
|
||||
end
|
||||
|
||||
def launch_app
|
||||
auth = current_user.remote_storage_authorizations.find(params[:id])
|
||||
launch_url = "#{auth.launch_url}#remotestorage=#{current_user.address}&access_token=#{auth.token}"
|
||||
launch_url = "#{@auth.launch_url}#remotestorage=#{current_user.address}&access_token=#{@auth.token}"
|
||||
|
||||
redirect_to launch_url, allow_other_host: true
|
||||
end
|
||||
@ -38,4 +34,9 @@ class Services::RsAuthsController < Services::BaseController
|
||||
def require_service_available
|
||||
http_status :not_found unless Setting.remotestorage_enabled?
|
||||
end
|
||||
|
||||
def find_rs_auth
|
||||
@auth = current_user.remote_storage_authorizations.find(params[:id])
|
||||
http_status :not_found unless @auth.present?
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user