mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
port complete
This commit is contained in:
parent
5d252b315e
commit
b60cf4d702
@ -79,11 +79,11 @@ $: client-id=(unit ,@t) app-secret=(unit ,@t)
|
||||
~
|
||||
::
|
||||
++ send-friend :: inter-app interface
|
||||
|= [ost=bone pax=path his=ship mez=$%([%bit-addr-request ~] [%bit-addr-made @t])]
|
||||
|= [ost=bone way=wire his=ship mez=$%([%bit-addr-request ~] [%bit-addr-made @t])]
|
||||
^- move
|
||||
[ost %send pax [his app.hid] %poke mez]
|
||||
[ost %send way [his app.hid] %poke mez]
|
||||
::
|
||||
++ poke--send :: send to ship
|
||||
++ poke-bit-send :: send to ship
|
||||
|= [[ost=bone @] to=ship amount=@t]
|
||||
=. outgoing.vat (~(put by outgoing.vat) to amount)
|
||||
:_ +>.$
|
||||
@ -202,15 +202,14 @@ $: client-id=(unit ,@t) app-secret=(unit ,@t)
|
||||
:_ ~
|
||||
!!
|
||||
::
|
||||
++ pour
|
||||
|= [ost=bone pax=path res=sign]
|
||||
?+ -.pax !!
|
||||
++ thou
|
||||
|= [[ost=bone @ way=wire] res=httr]
|
||||
?+ -.way !!
|
||||
%auth-token
|
||||
?> ?=(%thou -.res)
|
||||
~| 'must receive a 200'^oauth-code.vat
|
||||
~| res
|
||||
?> =(200 p.p.res)
|
||||
=+ resp=(rash q:(need r.p.res) apex:poja)
|
||||
?> =(200 p.res)
|
||||
=+ resp=(rash q:(need r.res) apex:poja)
|
||||
=+ parsed=(need ((ot 'refresh_token'^so 'access_token'^so ~):jo resp))
|
||||
~& parsed
|
||||
=: auth-token.vat [~ +.parsed]
|
||||
@ -221,25 +220,23 @@ $: client-id=(unit ,@t) app-secret=(unit ,@t)
|
||||
(publish ost our.hid [%lin & 'authenticated.']~)
|
||||
%message `+>.$
|
||||
?(%addr-request %get-id)
|
||||
?> ?=(%thou -.res)
|
||||
~| 'must receive a 200'
|
||||
~| res
|
||||
?> =(200 p.p.res)
|
||||
%- ?-(-.pax %addr-request pour-addr-request, %get-id pour-get-id)
|
||||
[ost pax (rash q:(need r.p.res) apex:poja)]
|
||||
?> =(200 p.res)
|
||||
%- ?-(-.way %addr-request pour-addr-request, %get-id pour-get-id)
|
||||
[ost way (rash q:(need r.res) apex:poja)]
|
||||
%auth
|
||||
:_ +>.$
|
||||
~
|
||||
?(%get-id %send %buy %list %sell)
|
||||
~& [`@tas`-.pax res]
|
||||
~& [`@tas`-.way res]
|
||||
:_ +>.$
|
||||
~
|
||||
%sent
|
||||
?> ?=(%thou -.res)
|
||||
~| 'must receive a 200'
|
||||
~| res
|
||||
?> =(200 p.p.res)
|
||||
=+ resp=(rash q:(need r.p.res) apex:poja)
|
||||
?> =(200 p.res)
|
||||
=+ resp=(rash q:(need r.res) apex:poja)
|
||||
=+ suc=((ot success/so ~):jo resp)
|
||||
:_ +>.$
|
||||
:_ ~
|
||||
|
@ -793,7 +793,7 @@
|
||||
^+ +>
|
||||
=+ cug=(ap-find /lame)
|
||||
?~ cug
|
||||
~& [%ap-lame wut why]
|
||||
~> %slog.[0 rose/[" " "[" "]"]^[>%ap-lame< >wut< why]]
|
||||
+>.$
|
||||
=^ cam +>.$
|
||||
%+ ap-call q.u.cug
|
||||
|
Loading…
Reference in New Issue
Block a user