import Test.QuickCheck (elements)
import Test.QuickCheck.Arbitrary (Arbitrary, arbitrary)
-import Gargantext.API.Admin.Auth (withAccess, PathId(..))
+import Gargantext.API.Admin.Auth.Types (PathId(..))
+import Gargantext.API.Admin.Auth (withAccess)
import Gargantext.API.Metrics
-import Gargantext.API.Ngrams (TabType(..), TableNgramsApi, apiNgramsTableCorpus)
+import Gargantext.API.Ngrams (TableNgramsApi, apiNgramsTableCorpus)
+import Gargantext.API.Ngrams.Types (TabType(..))
import Gargantext.API.Node.File
import Gargantext.API.Node.New
import Gargantext.API.Prelude
-- TODO gather it
:<|> tableApi id'
:<|> apiNgramsTableCorpus id'
-
+
:<|> catApi id'
:<|> Search.api id'
- :<|> Share.api id'
+ :<|> Share.api (RootId $ NodeId uId) id'
-- Pairing Tools
:<|> pairWith id'
:<|> pairs id'
type TreeAPI = QueryParams "type" NodeType :> Get '[JSON] (Tree NodeTree)
treeAPI :: NodeId -> GargServer TreeAPI
-treeAPI = tree Advanced
+treeAPI = tree TreeAdvanced
------------------------------------------------------------------------
-- | TODO Check if the name is less than 255 char