Project

General

Profile

Download (427 Bytes) Statistics
| Branch: | Tag: | Revision:
a551cc19 Paul Kelly
class SmartProxy < Sinatra::Base
get "/features" do
begin
@features = Proxy.features.sort
if request.accept.include?("application/json")
content_type :json
@features.to_json
else
erb :"features/index"
end
rescue => e
fcc0d38b Ohad Levy
log_halt 400, e
a551cc19 Paul Kelly
end
end
f47b233f Ohad Levy
get "/version" do
begin
Proxy.version.to_json
rescue => e
fcc0d38b Ohad Levy
log_halt 400, e
f47b233f Ohad Levy
end
end

a551cc19 Paul Kelly
end