Sha256: 820cd33e7f10dc6ed5f8fa8e9ebde8a25b477077a8a28ccbd3dc6e299a258428
Contents?: true
Size: 469 Bytes
Versions: 11
Compression:
Stored size: 469 Bytes
Contents
module PhantomProxy class Service < Goliath::API use Goliath::Rack::Params def response(env) env["params"] = params call_stack(env, StatusApi, ProxyApi) end def call_stack(env, *apis) last_answer = [404,{}, ""] apis.each do |api| last_answer = api.call(env) if last_answer[0] != 600 return last_answer end end last_answer[0] != 600 ? last_answer : [404,{}, ""] end end end
Version data entries
11 entries across 11 versions & 1 rubygems