landscape: move /nack path into lib

This commit is contained in:
Liam Fitzgerald 2021-11-24 15:12:22 -05:00
parent 1e180f420a
commit 8f368d3d5d
3 changed files with 17 additions and 15 deletions

View File

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

View File

@ -297,7 +297,6 @@
|= =path
?> (team:title [our src]:bowl)
?+ path (on-watch:def path)
[%nack ~] `this
::
[%preview @ @ @ ~]
=/ rid=resource
@ -325,7 +324,6 @@
=/ =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

View File

@ -319,12 +319,18 @@
|= =path
^- [(list card:agent:gall) agent:gall]
?> (team:title our.bowl src.bowl)
?. ?=([%tracking ~] path)
?+ path
:: forward by default
=^ cards pull-hook
(on-watch:og path)
[cards this]
:_ this
~[give-update]
::
[%nack ~] `this
::
[%tracking ~]
:_ this
~[give-update]
==
::
++ on-agent
|= [=wire =sign:agent:gall]
@ -455,7 +461,8 @@
|= tan=(unit tang)
?~ tan tr-core
?. versioned
(tr-ap-og:tr-cleanup |.((on-pull-nack:og rid u.tan)))
%- tr-ap-og:tr-cleanup:tr-give-nack
|.((on-pull-nack:og rid u.tan))
%- (slog leaf+"versioned nack for {<rid>} in {<dap.bowl>}" u.tan)
=/ pax
(kick-mule:virt rid |.((on-pull-kick:og rid)))
@ -569,6 +576,9 @@
:: +| %subscription: subscription cards
::
::
++ tr-give-nack
(tr-emit (fact:io resource+!>(rid) /nack ~))
::
++ tr-ver-wire
(make-wire /version)
::