metadata-store: update import functionality

This commit is contained in:
Liam Fitzgerald 2021-01-18 11:10:16 +10:00
parent c0ddf43865
commit ccb47e533d
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB
2 changed files with 17 additions and 2 deletions

View File

@ -25,7 +25,6 @@
^- (list @tas) ^- (list @tas)
:~ %group-store :~ %group-store
%metadata-store %metadata-store
%metadata-hook
%contact-store %contact-store
%contact-hook %contact-hook
%invite-store %invite-store

View File

@ -319,7 +319,23 @@
|= arc=* |= arc=*
^- (quip card _state) ^- (quip card _state)
|^ |^
(on-load !>([%7 (remake-metadata ;;(tree-metadata +.arc))])) =^ cards state
(on-load !>([%7 (remake-metadata ;;(tree-metadata +.arc))]))
:_ state
%+ weld cards
%+ turn ~(tap in ~(key by group-indices))
|= rid=resource
%- poke-our
?: =(entity.rid our.bowl)
:- %metadata-push-hook
push-hook-action+!>([%add rid])
:- %metadata-pull-hook
pull-hook-action+!>([%add [entity .]:rid])
::
++ poke-our
|= [app=term =cage]
^- card
[%pass / %agent [our.bowl app] %poke cage]
:: ::
+$ tree-metadata +$ tree-metadata
$: associations=(tree [md-resource [resource metadata]]) $: associations=(tree [md-resource [resource metadata]])