[FIX] dep with cabal file
[gargantext.git] / src / Gargantext / Database / Action / Share.hs
index 4c60e4cbd71831171472053bfbb36582ac7fe953..09875f122ddbc0a5824d6bab740be9a4282c536c 100644 (file)
@@ -16,7 +16,7 @@ module Gargantext.Database.Action.Share
 import Control.Lens (view)
 import Gargantext.Database
 import Gargantext.Core.Types.Individu (User(..))
-import Gargantext.Database.Action.Flow.Utils (getUserId)
+import Gargantext.Database.Action.User (getUserId)
 import Gargantext.Database.Admin.Config (hasNodeType, isInNodeTypes)
 import Gargantext.Database.Admin.Types.Hyperdata (HyperdataAny(..))
 import Gargantext.Database.Admin.Types.Node
@@ -29,16 +29,15 @@ import Gargantext.Prelude
 
 -- | TODO move in Config of Gargantext
 publicNodeTypes :: [NodeType]
-publicNodeTypes = [NodeDashboard, NodeGraph, NodePhylo]
+publicNodeTypes = [NodeDashboard, NodeGraph, NodePhylo, NodeFile]
 
 ------------------------------------------------------------------------
-
 data ShareNodeWith = ShareNodeWith_User { snwu_nodetype :: NodeType
-                                        , snwu_user    :: User }
+                                        , snwu_user     :: User
+                                        }
                    | ShareNodeWith_Node { snwn_nodetype :: NodeType
-                                        , snwn_node_id :: NodeId
+                                        , snwn_node_id  :: NodeId
                                         }
-
 ------------------------------------------------------------------------
 shareNodeWith :: HasNodeError err
               => ShareNodeWith
@@ -86,7 +85,6 @@ delFolderTeam u nId = do
   folderSharedId <- getFolderId u NodeFolderShared
   deleteNodeNode folderSharedId nId
 
-
 unPublish :: HasNodeError err
           => ParentId -> NodeId
           -> Cmd err Int