Pass station json direct to frontend
This commit is contained in:
parent
42da0d9ee3
commit
f363f38275
@ -94,10 +94,11 @@
|
|||||||
~& "on-arvo wire: {<wire>}"
|
~& "on-arvo wire: {<wire>}"
|
||||||
?: ?=(%http-response +<.sign-arvo)
|
?: ?=(%http-response +<.sign-arvo)
|
||||||
=/ http-moves=(list card)
|
=/ http-moves=(list card)
|
||||||
=/ value %- pairs:enjs:format
|
?+ wire ~
|
||||||
:~ fulltext+s+(crip "{<sign-arvo>}")
|
[%bartstationrequest *]
|
||||||
==
|
=/ value=json (parse-request-stations-response:cc client-response.sign-arvo)
|
||||||
[%give %fact ~[/primary] %json !>(value)]~
|
[%give %fact ~[/primary] %json !>(value)]~
|
||||||
|
==
|
||||||
[http-moves this]
|
[http-moves this]
|
||||||
?. ?=(%bound +<.sign-arvo)
|
?. ?=(%bound +<.sign-arvo)
|
||||||
(on-arvo:def wire sign-arvo)
|
(on-arvo:def wire sign-arvo)
|
||||||
@ -123,6 +124,19 @@
|
|||||||
=/ headers [['Accept' 'application/json']]~
|
=/ headers [['Accept' 'application/json']]~
|
||||||
[%'GET' url headers *(unit octs)]
|
[%'GET' url headers *(unit octs)]
|
||||||
::
|
::
|
||||||
|
++ parse-request-stations-response
|
||||||
|
|= response=client-response:iris
|
||||||
|
^- json
|
||||||
|
=/ pairs pairs:enjs:format
|
||||||
|
?. ?=(%finished -.response)
|
||||||
|
%- pairs [fulltext+s+'bart response error' ~]
|
||||||
|
=/ data=(unit mime-data:iris) full-file.response
|
||||||
|
?~ data %- pairs ~
|
||||||
|
=/ ujon=(unit json) (de-json:html q.data.u.data)
|
||||||
|
?~ ujon %- pairs ~
|
||||||
|
=/ parsed-json u.ujon
|
||||||
|
parsed-json
|
||||||
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
|= =inbound-request:eyre
|
|= =inbound-request:eyre
|
||||||
^- simple-payload:http
|
^- simple-payload:http
|
||||||
|
Loading…
Reference in New Issue
Block a user