Move timeout outside the array for fwd json

Stephen Paul Weber created

Change summary

lib/customer_fwd.rb | 6 ++++--
web.rb              | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)

Detailed changes

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 = {

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