Commit 60edf362 authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Unpublish is now called unshare

This follows the changes required for:

haskell-gargantext!366
parent 6b2fdd33
Pipeline #6984 passed with stages
in 16 minutes and 54 seconds
......@@ -16,7 +16,7 @@ import Gargantext.Components.Bootstrap.BaseModal (hideModal)
import Gargantext.Components.Bootstrap.Types (Elevation(..), Variant(..))
import Gargantext.Components.Forest.Tree.Node.Action.Add (AddNodeValue(..), addNode)
import Gargantext.Components.Forest.Tree.Node.Action.Contact as Contact
import Gargantext.Components.Forest.Tree.Node.Action.Delete (deleteNode, unpublishNode)
import Gargantext.Components.Forest.Tree.Node.Action.Delete (deleteNode, unshareNode)
import Gargantext.Components.Forest.Tree.Node.Action.Link (linkNodeReq)
import Gargantext.Components.Forest.Tree.Node.Action.Merge (mergeNodeReq)
import Gargantext.Components.Forest.Tree.Node.Action.Move (moveNodeReq)
......@@ -361,7 +361,7 @@ performAction = performAction' where
deleteNode' nt p@{ nodeId: id, parentId: parent_id, session } = do
case nt of
NodePublic FolderPublic -> void $ deleteNode session id
NodePublic _ -> void $ unpublishNode session (Just parent_id) id
NodePublic _ -> void $ unshareNode session (Just parent_id) id
_ -> void $ deleteNode session id
refreshFolders p
......
......@@ -17,7 +17,7 @@ import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Forest.Tree.Node (blankNodeSpan, nodeSpan)
import Gargantext.Components.Forest.Tree.Node.Action.Add (AddNodeValue(..), addNode)
import Gargantext.Components.Forest.Tree.Node.Action.Contact as Contact
import Gargantext.Components.Forest.Tree.Node.Action.Delete (deleteNode, unpublishNode)
import Gargantext.Components.Forest.Tree.Node.Action.Delete (deleteNode, unshareNode)
import Gargantext.Components.Forest.Tree.Node.Action.Link (linkNodeReq)
import Gargantext.Components.Forest.Tree.Node.Action.Merge (mergeNodeReq)
import Gargantext.Components.Forest.Tree.Node.Action.Move (moveNodeReq)
......@@ -373,7 +373,7 @@ refreshTree p@{ reloadTree } = liftEffect $ closeBox p *> T2.reload reloadTree
deleteNode' nt p@{ boxes: { forestOpen }, session, tree: (NTree (LNode {id, parent_id}) _) } = do
case nt of
GT.NodePublic GT.FolderPublic -> void $ deleteNode session id
GT.NodePublic _ -> void $ unpublishNode session parent_id id
GT.NodePublic _ -> void $ unshareNode session parent_id id
_ -> void $ deleteNode session id
liftEffect $ T.modify_ (openNodesDelete (mkNodeId session id)) forestOpen
refreshTree p
......
......@@ -32,8 +32,8 @@ deleteNode session nodeId = delete session $ NodeAPI GT.Node (Just nodeId) ""
-}
type ParentID = GT.ID
unpublishNode :: Session -> Maybe ParentID -> GT.ID -> AffRESTError GT.ID
unpublishNode s p n = put_ s $ NodeAPI GT.Node p ("unpublish/" <> show n)
unshareNode :: Session -> Maybe ParentID -> GT.ID -> AffRESTError GT.ID
unshareNode s p n = put_ s $ NodeAPI GT.Node p ("unshare/" <> show n)
-- | Action : Delete
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment