From 430d56d7d1e2de7ebc8acab676f57a23d9fa3a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Paraniak?= Date: Tue, 29 Oct 2024 18:03:18 +0800 Subject: [PATCH] contacts: fix $response-0 JSON --- desk/lib/contacts/json-1.hoon | 7 ++++--- desk/tests/lib/contacts-json-1.hoon | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/desk/lib/contacts/json-1.hoon b/desk/lib/contacts/json-1.hoon index 8837e4b..cbf368e 100644 --- a/desk/lib/contacts/json-1.hoon +++ b/desk/lib/contacts/json-1.hoon @@ -67,17 +67,18 @@ ++ response |= n=response:c ^- json + %+ frond -.n ?- -.n - %self (frond self+(contact con.n)) + %self (frond contact+(contact con.n)) %page %- pairs :~ kip+(kip kip.n) - con+(contact con.n) + contact+(contact con.n) mod+(contact mod.n) == %wipe (frond kip+(kip kip.n)) %peer %- pairs :~ who+(ship who.n) - con+(contact con.n) + contact+(contact con.n) == == -- diff --git a/desk/tests/lib/contacts-json-1.hoon b/desk/tests/lib/contacts-json-1.hoon index 8ac7a50..6f72b06 100644 --- a/desk/tests/lib/contacts-json-1.hoon +++ b/desk/tests/lib/contacts-json-1.hoon @@ -122,7 +122,7 @@ flag+[~sampel-palnet %circle] :: %+ enjs-equal - %- value:enjs:j + %- value:enjs:j set+(silt `(list value)`~[flag/[~sampel-palnet %circle] flag/[~sampel-pardux %square]]) '{"type":"set","value":[{"type":"flag","value":"~sampel-palnet/circle"},{"type":"flag","value":"~sampel-pardux/square"}]}' :: @@ -207,7 +207,7 @@ :~ surname+text/'Palnet' == ;: weld - %+ enjs-equal + %+ enjs-equal (response:enjs:j [%self con]) '{"self":{"contact":{"name":{"type":"text","value":"Sampel"}}}}' :: @@ -224,15 +224,15 @@ } ''' :: - %+ enjs-equal + %+ enjs-equal (response:enjs:j [%wipe id+0v1]) '{"wipe":{"kip":"0v1"}}' :: - %+ enjs-equal + %+ enjs-equal (response:enjs:j [%wipe ~sampel-palnet]) '{"wipe":{"kip":"~sampel-palnet"}}' :: - %+ enjs-equal + %+ enjs-equal (response:enjs:j [%peer ~sampel-palnet con]) ^~ %- en:json:html %- need %- de:json:html '''