From af2f430cb2cf7007a4b5a03f5749a92836af990f Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 7 May 2024 21:50:13 -0500 Subject: [PATCH] Move timeout outside the array for fwd json --- lib/customer_fwd.rb | 6 ++++-- web.rb | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/customer_fwd.rb b/lib/customer_fwd.rb index d57b371ae205cbb57566dbfef6a4da7278d015a5..a584fd1888e962b393c929af2337a34e088b647e 100644 --- a/lib/customer_fwd.rb +++ b/lib/customer_fwd.rb @@ -117,7 +117,7 @@ class CustomerFwd end def as_json(*) - [to_h] + { timeout: timeout, uris: [uri] } end def to_json(*args) @@ -153,7 +153,9 @@ class CustomerFwd def to; end - def as_json(*); end + def as_json(*) + [] + end end URIS = { diff --git a/web.rb b/web.rb index a5252bf0e0eaf022a824798f4acb241b7bd8a6b8..c3ebae53ff5ee3f47c14fb1bd13c4e04a2824bb8 100644 --- a/web.rb +++ b/web.rb @@ -211,7 +211,7 @@ class Web < Roda customer.ogm(params["from"]).then do |ogm| call_attempt.as_json.merge( - fwd: Array(fwd.as_json), + fwd: fwd, ogm: ogm ).to_json end