2 Module : Gargantext.Core.Text.List.Social
4 Copyright : (c) CNRS, 2018-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
13 module Gargantext.Core.Text.List.Social
16 import Gargantext.Database.Prelude
17 import Gargantext.Database.Query.Tree
18 import Gargantext.Database.Query.Tree.Root (getRootId)
19 import Gargantext.Core.Types.Individu
20 import Gargantext.Database.Admin.Types.Node
21 import Gargantext.Prelude
22 import Gargantext.Database.Query.Table.Node.Error
23 import Gargantext.Database.Admin.Config
25 findListsId :: (HasNodeError err, HasTreeError err) => NodeMode -> User -> Cmd err [NodeId]
26 findListsId mode u = do
28 map _dt_nodeId <$> filter (\n -> _dt_typeId n == nodeTypeId NodeList)
31 findNodes' :: HasTreeError err
33 -> Cmd err [DbTreeNode]
34 findNodes' Private r = findNodes Private r [NodeFolderPrivate, NodeCorpus, NodeList]
35 findNodes' Shared r = findNodes Shared r [NodeFolderShared, NodeCorpus, NodeList]
36 findNodes' Public r = findNodes Public r [NodeFolderPublic, NodeCorpus, NodeList]