From 302c004032edf78906be723b152a807eb6af757c Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 10 Mar 2016 11:45:46 -0800 Subject: [PATCH] nicer grab-quay type --- lib/oauth1.hoon | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/oauth1.hoon b/lib/oauth1.hoon index 5a629f1b47..059f795081 100644 --- a/lib/oauth1.hoon +++ b/lib/oauth1.hoon @@ -62,7 +62,7 @@ :: ++ dbg-post `purl`[`hart`[| `6.000 [%& /localhost]] `pork``/testing `quay`/] ++ bad-response |=(a/@u ?:(=(2 (div a 100)) | ~&(bad-httr+a &))) -++ quay-keys |-($@(knot {knot $})) :: improper list +++ quay-keys |-($@(knot {$ $})) :: improper tree ++ grab-quay :: ?=({@t @t @t} ((grab-quay *httr) %key1 %key2 %key3)) |= a/httr ~| bad-quay+r.a @@ -71,8 +71,7 @@ =+ all=(malt quy) |* b/quay-keys ?@ b ~|(b (~(got by all) b)) - :- ~|(-.b (~(got by all) -.b)) - (..$ +.b) + [(..$ -.b) (..$ +.b)] :: ++ parse-url |= a/$@(cord:purl purl) ^- purl @@ -171,7 +170,7 @@ :: +- res-parse |* para/quay-keys - |= handle/$-(_?~(para ~ (*grab-quay para)) core-move) + |= handle/$-(_para core-move) :: same structure of values as keys |= a/httr ^- core-move ?: (bad-response p.a) [%give a]