diff --git a/web.rb b/web.rb index 6dcaaaa82d8a71e7579804f9ccca8b74a90c7902..bd1ba56973cea5cb72f49cd8d2cf1789018424f5 100644 --- a/web.rb +++ b/web.rb @@ -49,6 +49,7 @@ class Web < Roda use Rack::Fiber unless ENV["ENV"] == "test" # Must go first! use Sentry::Rack::CaptureExceptions plugin :json_parser + plugin :type_routing plugin :public plugin :render, engine: "slim" plugin RodaCapture @@ -279,6 +280,13 @@ class Web < Roda customer_repo( sgx_repo: Bwmsgsv2Repo.new ).find_by_format(from).then do |c| + r.json do + { + from: c.registered?.phone, + to: params["to"] + }.to_json + end + render :forward, locals: { from: c.registered?.phone, to: params["to"]