From 5f219f00f5aa09b7c1cef5b614ceb684e7fd2813 Mon Sep 17 00:00:00 2001 From: ronreg-ribdev <56719257+ronreg-ribdev@users.noreply.github.com> Date: Sat, 23 May 2020 06:10:11 -0700 Subject: [PATCH] Writing useful bart info into webapp!! --- urbit/app/bartinfo.hoon | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/urbit/app/bartinfo.hoon b/urbit/app/bartinfo.hoon index dab4d24..070a7ea 100644 --- a/urbit/app/bartinfo.hoon +++ b/urbit/app/bartinfo.hoon @@ -76,8 +76,12 @@ ^- (quip card:agent:gall _this) ~& "on-watch path: {}" ?: ?=([%primary *] path) - :_ this - [%give %fact ~ %json !>((bogus-json:cc))]~ + =/ initial-resp [%give %fact ~ %json !>((bogus-json:cc))] + =/ out *outbound-config:iris + =/ req request-bart-stations:cc + ::=/ bart-station-request [%pass /[(scot %da now.bol)] %arvo %i %request req out] + =/ bart-station-request [%pass /bartstationrequest %arvo %i %request req out] + [[initial-resp bart-station-request ~] this] ?: ?=([%http-response *] path) `this ?. =(/ path) @@ -89,6 +93,13 @@ ++ on-arvo |= [=wire =sign-arvo] ^- (quip card _this) + ?: ?=(%http-response +<.sign-arvo) + ~& "WIRE: {}" + ::~& "SIGN ARVO: {}" + =/ value %- pairs:enjs:format + :~ fulltext+s+(crip "{}") + == + [[%give %fact ~[/primary] %json !>(value)]~ this] ?. ?=(%bound +<.sign-arvo) (on-arvo:def wire sign-arvo) [~ this]