shrub/pkg/arvo/mar/publish/action.hoon

193 lines
3.7 KiB
Plaintext
Raw Normal View History

::
2019-07-12 01:07:05 +03:00
:::: /hoon/action/publish/mar
::
/? 309
2019-07-12 01:07:05 +03:00
/- publish
=, format
::
2019-07-12 01:07:05 +03:00
|_ act=action:publish
::
++ grow
|%
++ tank >act<
--
::
++ grab
|%
2019-07-12 01:07:05 +03:00
++ noun action:publish
++ json
|= jon=^json
2019-07-12 01:07:05 +03:00
%- action:publish
=< (action jon)
|%
++ action
%- of:dejs
:~ new-collection+new-collection
new-post+new-post
new-comment+new-comment
::
2019-06-21 23:24:33 +03:00
delete-collection+delete-collection
delete-post+delete-post
delete-comment+delete-comment
::
edit-collection+edit-collection
edit-post+edit-post
::
invite+invite
2019-06-21 23:24:33 +03:00
reject-invite+reject-invite
::
serve+serve
unserve+unserve
::
subscribe+subscribe
unsubscribe+unsubscribe
::
2019-06-21 23:24:33 +03:00
read+read
==
::
++ new-collection
%- ot:dejs
2019-08-13 20:39:56 +03:00
:~ name+so:dejs
title+so:dejs
comments+comment-config
allow-edit+edit-config
perm+perm-config
==
::
++ new-post
%- ot:dejs
2019-06-17 21:39:53 +03:00
:~ who+(su:dejs fed:ag)
2019-08-13 20:39:56 +03:00
coll+so:dejs
name+so:dejs
title+so:dejs
comments+comment-config
perm+perm-config
content+so:dejs
==
::
++ new-comment
%- ot:dejs
2019-06-17 21:39:53 +03:00
:~ who+(su:dejs fed:ag)
2019-08-13 20:39:56 +03:00
coll+so:dejs
name+(su:dejs sym)
content+so:dejs
==
::
2019-07-19 01:34:42 +03:00
++ delete-collection
%- ot:dejs
2019-08-13 20:39:56 +03:00
:~ coll+so:dejs
2019-07-19 01:34:42 +03:00
==
2019-06-21 23:24:33 +03:00
::
++ delete-post
%- ot:dejs
2019-08-13 20:39:56 +03:00
:~ coll+so:dejs
post+so:dejs
2019-06-21 23:24:33 +03:00
==
::
++ delete-comment
%- ot:dejs
2019-08-13 20:39:56 +03:00
:~ coll+so:dejs
post+so:dejs
comment+so:dejs
2019-06-21 23:24:33 +03:00
==
::
++ edit-collection
%- ot:dejs
2019-08-13 20:39:56 +03:00
:~ name+so:dejs
title+so:dejs
==
::
++ edit-post
%- ot:dejs
2019-06-17 21:39:53 +03:00
:~ who+(su:dejs fed:ag)
2019-08-13 20:39:56 +03:00
coll+so:dejs
name+so:dejs
title+so:dejs
comments+comment-config
perm+perm-config
content+so:dejs
==
::
++ edit-comment
%- ot:dejs
2019-08-13 20:39:56 +03:00
:~ coll+so:dejs
name+so:dejs
id+so:dejs
content+so:dejs
==
::
++ comment-config
%- su:dejs
;~(pose (jest %open) (jest %closed) (jest %none))
::
++ edit-config
%- su:dejs
;~(pose (jest %post) (jest %comment) (jest %all) (jest %none))
::
++ perm-config
%- ot:dejs
:~ :- %read
%- ot:dejs
:~ mod+(su:dejs ;~(pose (jest %black) (jest %white)))
who+whoms
==
:- %write
%- ot:dejs
:~ mod+(su:dejs ;~(pose (jest %black) (jest %white)))
who+whoms
== ==
::
++ whoms
|= jon=^json
^- (set whom:clay)
=/ x ((ar:dejs (su:dejs fed:ag)) jon)
%- (set whom:clay)
%- ~(run in (sy x))
|=(w=@ [& w])
::
++ invite
%- ot:dejs
2019-08-13 20:39:56 +03:00
:~ coll+so:dejs
2019-06-21 23:24:33 +03:00
title+so:dejs
who+(ar:dejs (su:dejs fed:ag))
==
::
2019-06-21 23:24:33 +03:00
++ reject-invite
%- ot:dejs
:~ who+(su:dejs fed:ag)
2019-08-13 20:39:56 +03:00
coll+so:dejs
2019-06-21 23:24:33 +03:00
==
::
++ serve
%- ot:dejs
2019-08-13 20:39:56 +03:00
:~ coll+so:dejs
==
::
++ unserve
%- ot:dejs
2019-08-13 20:39:56 +03:00
:~ coll+so:dejs
==
::
++ subscribe
%- ot:dejs
:~ who+(su:dejs fed:ag)
2019-08-13 20:39:56 +03:00
coll+so:dejs
==
::
++ unsubscribe
%- ot:dejs
:~ who+(su:dejs fed:ag)
2019-08-13 20:39:56 +03:00
coll+so:dejs
==
::
2019-06-21 23:24:33 +03:00
++ read
%- ot:dejs
:~ who+(su:dejs fed:ag)
2019-08-13 20:39:56 +03:00
coll+so:dejs
post+so:dejs
2019-06-21 23:24:33 +03:00
==
::
--
--
--