landscape: add /nack path to group,metadata pull-hook

This commit is contained in:
Liam Fitzgerald 2021-11-01 12:29:40 -05:00
parent 7f7c81b018
commit 8e603751e8
2 changed files with 26 additions and 16 deletions

View File

@ -37,7 +37,10 @@
++ on-load on-load:def
++ on-poke on-poke:def
++ on-agent on-agent:def
++ on-watch on-watch:def
++ on-watch
|= =path
?. ?=([%nack ~] path) (on-watch:def path)
`this
++ on-leave on-leave:def
++ on-peek on-peek:def
++ on-arvo on-arvo:def
@ -47,8 +50,11 @@
^- (quip card _this)
%- (slog tang)
:_ this
=- [%pass / %agent [our.bowl %group-store] %poke -]~
group-update-0+!>([%remove-group resource ~])
:~ =- [%pass / %agent [our.bowl %group-store] %poke -]
group-update-0+!>([%remove-group resource ~])
::
`card`[%give %fact ~[/nack] resource+!>(resource)]
==
::
++ on-pull-kick
|= =resource

View File

@ -296,19 +296,22 @@
++ on-watch
|= =path
?> (team:title [our src]:bowl)
?. ?=([%preview @ @ @ ~] path)
(on-watch:def path)
=/ rid=resource
(de-path:resource t.path)
=/ prev=(unit group-preview:metadata)
?^ (peek-metadatum:met %groups rid)
(some (get-preview:met rid))
(~(get by previews) rid)
?~ prev
:_ this(pending (~(put in pending) rid))
(get-preview rid)^~
:_ this
(fact-init:io metadata-hook-update+!>([%preview u.prev]))^~
?+ path (on-watch:def path)
[%nack ~] `this
::
[%preview @ @ @ ~]
=/ rid=resource
(de-path:resource t.path)
=/ prev=(unit group-preview:metadata)
?^ (peek-metadatum:met %groups rid)
(some (get-preview:met rid))
(~(get by previews) rid)
?~ prev
:_ this(pending (~(put in pending) rid))
(get-preview rid)^~
:_ this
(fact-init:io metadata-hook-update+!>([%preview u.prev]))^~
==
::
++ on-leave on-leave:def
++ on-peek on-peek:def
@ -322,6 +325,7 @@
=/ =associations:metadata
(metadata-for-group:met resource)
:_ this
:- `card`[%give %fact ~[/nack] resource+!>(resource)]
%+ turn ~(tap by associations)
|= [=md-resource:metadata =association:metadata]
%+ poke-our:pass:io %metadata-store