settings: add mark for scry result for frontend scry json conversion

This commit is contained in:
Isaac Visintainer 2021-01-25 16:43:47 -08:00
parent 78bdcbf020
commit 026b7b09ce
4 changed files with 36 additions and 3 deletions

View File

@ -76,13 +76,13 @@
^- (unit (unit cage))
?+ pax (on-peek:def pax)
[%x %all ~]
``noun+!>(settings)
``settings-data+!>(all+settings)
::
[%x %bucket @ ~]
=* buc i.t.t.pax
=/ bucket=(unit bucket) (~(get by settings) buc)
?~ bucket [~ ~]
``noun+!>(u.bucket)
``settings-data+!>(bucket+u.bucket)
::
[%x %entry @ @ ~]
=* buc i.t.t.pax
@ -90,7 +90,7 @@
=/ =bucket (fall (~(get by settings) buc) ~)
=/ entry=(unit val) (~(get by bucket) key)
?~ entry [~ ~]
``noun+!>(u.entry)
``settings-data+!>(entry+u.entry)
==
::
++ on-agent on-agent:def

View File

@ -3,6 +3,21 @@
++ enjs
=, enjs:format
|%
++ data
|= dat=^data
^- json
%+ frond -.dat
?- -.dat
%all (settings +.dat)
%bucket (bucket +.dat)
%entry (value +.dat)
==
::
++ settings
|= s=^settings
^- json
[%o (~(run by s) bucket)]
::
++ event
|= evt=^event
^- json

View File

@ -0,0 +1,13 @@
/+ *settings
|_ dat=data
++ grad %noun
++ grow
|%
++ noun dat
++ json (data:enjs dat)
--
++ grab
|%
++ noun data
--
--

View File

@ -13,4 +13,9 @@
[%put-entry buc=key =key =val]
[%del-entry buc=key =key]
==
+$ data
$% [%all =settings]
[%bucket =bucket]
[%entry =val]
==
--