Sha256: e2a79e375cc355cb6d4aef6aed36bdce8816b49351f58f8f3501822a38493b32
Contents?: true
Size: 853 Bytes
Versions: 15
Compression:
Stored size: 853 Bytes
Contents
class RhoconnectConsole::Server get '/adapter' do if params[:xhr] or request.xhr? @adapter = nil handle_api_error("Can't load adapter url") do @adapter = RhoconnectApi::get_adapter(session[:server],session[:token])['adapter_url'] @domain = ENV['RHODES_URL'] || request.session[:server_url] + "/application" end erb :adapter, :layout => false else render_page url_path("/adapter") end end post '/adapter/create' do session[:errors] = nil verify_format_of :adapter_url, "url must start with http(s)" unless session[:errors] handle_api_error("Can't save adapter url") do RhoconnectApi::save_adapter(session[:server], session[:token],params[:adapter_url]) end end redirect url_path( '/adapter'), 303 end end
Version data entries
15 entries across 15 versions & 1 rubygems