mirror of
https://github.com/urbit/shrub.git
synced 2024-09-11 20:27:19 +03:00
finish merge from wh/sky-post-pokes
This commit is contained in:
parent
c9c5179897
commit
fab61be47e
@ -2,7 +2,7 @@
|
||||
/@ htmx-type=htmx
|
||||
/@ htmx-type=htmx
|
||||
/- feather-icons
|
||||
/- serv=server
|
||||
/- serv=sky-server
|
||||
/> htmx
|
||||
/< node
|
||||
=>
|
||||
@ -10,24 +10,6 @@
|
||||
++ manx-to-octs
|
||||
|= man=manx
|
||||
(as-octt:mimes:html (en-xml:html man))
|
||||
++ parse-url
|
||||
|= =request:http
|
||||
^- [pax=path pam=(map @t @t)]
|
||||
=/ parsed
|
||||
%+ rash url.request
|
||||
;~ plug
|
||||
;~(pfix fas (more fas smeg:de-purl:html))
|
||||
yque:de-purl:html
|
||||
==
|
||||
:: strip first 2 segments (/neo/hawk)
|
||||
:- (slag 2 -.parsed)
|
||||
(malt +.parsed)
|
||||
++ parse-body
|
||||
|= =request:http
|
||||
^- manx
|
||||
%+ fall
|
||||
(de-xml:html q:(fall body.request [p=0 q='']))
|
||||
*manx
|
||||
++ eyre-cards
|
||||
|= [eyre-id=@ta =bowl:neo status=@ud =manx]
|
||||
^- (list card:neo)
|
||||
@ -239,13 +221,14 @@
|
||||
=/ [=stud:neo =vase] (need pal)
|
||||
=+ !<([eyre-id=@ta req=inbound-request:eyre] vase)
|
||||
:_ [stud vase]
|
||||
?. authenticated.req
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
bowl
|
||||
403
|
||||
;div: 403
|
||||
==
|
||||
::XX revive when auth
|
||||
::?. authenticated.req
|
||||
:: %: eyre-cards
|
||||
:: eyre-id
|
||||
:: bowl
|
||||
:: 403
|
||||
:: ;div: 403
|
||||
:: ==
|
||||
?~ src=(~(get by deps.bowl) %src)
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
@ -253,6 +236,12 @@
|
||||
404
|
||||
;div: 404
|
||||
==
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
bowl
|
||||
200
|
||||
~(lift hawk #/[p/our.bowl] main raw |)
|
||||
==
|
||||
=/ here p.u.src
|
||||
^- (list card:neo)
|
||||
?+ method.request.req ~|(%unsupported-http-method !!)
|
||||
@ -274,15 +263,20 @@
|
||||
200
|
||||
~(lift hawk here.bol main raw)
|
||||
==
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
bowl
|
||||
200
|
||||
~(lift hawk here.bol main raw &)
|
||||
==
|
||||
::
|
||||
%'POST'
|
||||
=/ purl (parse-url request.req)
|
||||
=/ body (parse-body request.req)
|
||||
=/ purl (parse-url:serv request.req)
|
||||
=/ body (parse-body:serv request.req)
|
||||
=/ poke-stud
|
||||
^- stud:neo
|
||||
~| %no-stud-specified
|
||||
(~(got by pam.purl) 'stud')
|
||||
::=/ mul `(each ^vase tang)`[%.y p=!>(~)] :: stub for build system bug
|
||||
=/ mul (mule |.((node [poke-stud body])))
|
||||
?- -.mul
|
||||
%.n
|
||||
@ -297,6 +291,17 @@
|
||||
;div: {(of-wall:format (~(win re tank) 0 55))}
|
||||
==
|
||||
==
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
bowl
|
||||
400
|
||||
;div
|
||||
;*
|
||||
%+ turn (tang p.mul)
|
||||
|= =tank
|
||||
;div: {(of-wall:format (~(win re tank) 0 55))}
|
||||
==
|
||||
==
|
||||
::
|
||||
%.y
|
||||
=/ =pail:neo [poke-stud p.mul]
|
||||
@ -322,6 +327,12 @@
|
||||
200
|
||||
manx
|
||||
==
|
||||
%: eyre-cards
|
||||
eyre-id
|
||||
bowl
|
||||
200
|
||||
manx
|
||||
==
|
||||
==
|
||||
==
|
||||
--
|
||||
|
@ -22,8 +22,8 @@
|
||||
%eyre-task
|
||||
=+ !<(=task:eyre:neo vax)
|
||||
=/ [eyre-id=@ta req=inbound-request:eyre] task
|
||||
=/ lin (parse-request-line:serv url.request.req)
|
||||
=/ inner=pith:neo (pave:neo (slag 2 site.lin))
|
||||
=/ purl (parse-url:serv request.req)
|
||||
=/ inner=pith:neo (pave:neo pax.purl)
|
||||
=/ =crew:neo (~(gas by *crew:neo) src/inner ~)
|
||||
=/ =made:neo [%hawk-eyre-handler `[stud vax] crew]
|
||||
=/ =made:neo [%hawk-eyre-handler `[stud vax] crew]
|
||||
|
Loading…
Reference in New Issue
Block a user