From 61e1a40650e3d8cfacecbc0b377ffede6fb4e921 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Tue, 15 Sep 2020 11:23:13 +1000 Subject: [PATCH] graph-view: remove typing of app --- pkg/arvo/lib/graph-view.hoon | 36 +++++++++++----------------------- pkg/arvo/sur/graph-view.hoon | 14 ++++++------- pkg/arvo/ted/graph/create.hoon | 2 +- 3 files changed, 18 insertions(+), 34 deletions(-) diff --git a/pkg/arvo/lib/graph-view.hoon b/pkg/arvo/lib/graph-view.hoon index 2d35223f6f..efc6fa59d7 100644 --- a/pkg/arvo/lib/graph-view.hoon +++ b/pkg/arvo/lib/graph-view.hoon @@ -4,12 +4,6 @@ =< [sur .] =, sur |% -++ app-to-mark - |= app=app-name - ?+ app ~|("nonexistent app" !!) - %chat %graph-validator-chat - %publish %graph-validator-publish - == ++ dejs =, dejs:format |% @@ -26,46 +20,38 @@ == :: ++ create - %- ot - :~ resource+dejs:resource - title+so - description+so - app+app - associated+associated - == - :: - ++ app - |= jon=json - ^- app-name - ?> ?=(%s -.jon) - ?+ p.jon !! - %chat %chat - %publish %publish + %- ou + :~ resource+(un dejs:resource) + title+(un so) + description+(un so) + mark+(uf ~ (mu so)) + app+(un so) + associated+(un associated) == :: ++ leave %- ot :~ resource+dejs:resource - app+app + app+so == :: ++ delete %- ot :~ resource+dejs:resource - app+app + app+so == :: ++ join %- ot :~ resource+dejs:resource - app+app + app+so ship+(su ;~(pfix sig fed:ag)) == :: ++ groupify %- ou :~ resource+(un dejs:resource) - app+(un app) + app+(un so) to+(uf ~ (mu dejs:resource)) == ++ invite !! diff --git a/pkg/arvo/sur/graph-view.hoon b/pkg/arvo/sur/graph-view.hoon index a218f4e72f..17ea8acd44 100644 --- a/pkg/arvo/sur/graph-view.hoon +++ b/pkg/arvo/sur/graph-view.hoon @@ -8,9 +8,6 @@ $% [%group rid=resource] [%policy =policy] == -:: $app: An app that is associated to a graph-store mark -:: -+$ app-name ?(%chat %publish %links) :: :: $error: An error from a graph-view poke :: @@ -34,14 +31,15 @@ rid=resource title=@t description=@t - app=app-name + mark=(unit mark) + app=@tas =associated == - [%delete rid=resource app=app-name] - [%leave rid=resource app=app-name] - [%join rid=resource app=app-name =ship] + [%delete rid=resource app=@tas] + [%leave rid=resource app=@tas] + [%join rid=resource app=@tas =ship] ::[%invite rid=resource ships=(set ship)] - [%groupify rid=resource app=app-name to=(unit resource)] + [%groupify rid=resource app=@tas to=(unit resource)] == -- diff --git a/pkg/arvo/ted/graph/create.hoon b/pkg/arvo/ted/graph/create.hoon index a8043b39c5..98b37fd6fb 100644 --- a/pkg/arvo/ted/graph/create.hoon +++ b/pkg/arvo/ted/graph/create.hoon @@ -32,7 +32,7 @@ ?. =(our.bowl entity.rid.action) (strand-fail:strandio %bad-request ~) =/ =update:graph - [%0 now.bowl %add-graph rid.action *graph:graph `(app-to-mark:graph-view app.action)] + [%0 now.bowl %add-graph rid.action *graph:graph mark.action] ;< ~ bind:m (poke-our %graph-store graph-update+!>(update)) ;< ~ bind:m