group-hooks: upgrade for versioning

This commit is contained in:
Liam Fitzgerald 2021-03-11 13:50:36 +10:00
parent 153d0ff347
commit 360b447a3e
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB
5 changed files with 24 additions and 5 deletions

View File

@ -14,6 +14,7 @@
update:store
%group-update
%group-push-hook
0 0
%.n
==
::
@ -44,6 +45,7 @@
++ on-pull-nack
|= [=resource =tang]
^- (quip card _this)
%- (slog tang)
:_ this
=- [%pass / %agent [our.bowl %group-store] %poke -]~
group-update+!>([%remove-group resource ~])

View File

@ -17,6 +17,7 @@
update:store
%group-update
%group-pull-hook
0 0
==
::
+$ agent (push-hook:push-hook config)

View File

@ -113,7 +113,7 @@
?+ mark (on-poke:def mark vase)
%sane (poke-sane:gc !<(?(%check %fix) vase))
::
?(%group-update %group-action)
?(%group-update-0 %group-action)
(poke-group-update:gc !<(update:store vase))
::
%import
@ -127,7 +127,7 @@
?> (team:title our.bowl src.bowl)
?> ?=([%groups ~] path)
:_ this
[%give %fact ~ %group-update !>([%initial groups])]~
[%give %fact ~ %group-update-0 !>([%initial groups])]~
::
++ on-leave on-leave:def
::
@ -298,7 +298,7 @@
|= [rid=resource nack-count=@ud]
^- card
=/ =cage
:- %group-update
:- %group-update-0
!> ^- update:store
[%add-members rid (sy our.bol ~)]
=/ =wire
@ -583,6 +583,6 @@
++ send-diff
|= =update:store
^- (list card)
[%give %fact ~[/groups] %group-update !>(update)]~
[%give %fact ~[/groups] %group-update-0 !>(update)]~
::
--

View File

@ -5,6 +5,6 @@
|= $: [now=@da eny=@uvJ =beak]
[[=term ~] ~]
==
:- %group-update
:- %group-action
^- action
[%add-group [p.beak term] *open:policy %.n]

View File

@ -0,0 +1,16 @@
/+ *group-store
|_ upd=update
++ grad %noun
++ grow
|%
++ noun upd
++ json
%+ frond:enjs:format 'groupUpdate'
(update:enjs upd)
--
++ grab
|%
++ noun update
++ json update:dejs
--
--