Commit 2b4fd184 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] update api ok

parent 75fa6dfa
...@@ -9,7 +9,7 @@ import Gargantext.Components.Forest.Tree.Node.Tools (formChoiceSafe, submitButto ...@@ -9,7 +9,7 @@ import Gargantext.Components.Forest.Tree.Node.Tools (formChoiceSafe, submitButto
import Gargantext.Types (NodeType(..), ID) import Gargantext.Types (NodeType(..), ID)
import Gargantext.Types as GT import Gargantext.Types as GT
import Gargantext.Prelude (Unit, bind, ($), pure) import Gargantext.Prelude (Unit, bind, ($), pure)
import Gargantext.Sessions (Session, put) import Gargantext.Sessions (Session, post)
import Gargantext.Routes as GR import Gargantext.Routes as GR
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
...@@ -17,28 +17,28 @@ import Reactix.DOM.HTML as H ...@@ -17,28 +17,28 @@ import Reactix.DOM.HTML as H
updateRequest :: UpdateNodeParams -> Session -> ID -> Aff GT.AsyncTaskWithType updateRequest :: UpdateNodeParams -> Session -> ID -> Aff GT.AsyncTaskWithType
updateRequest (UpdateNodeParamsList meth) session nodeId = do updateRequest (UpdateNodeParamsList meth) session nodeId = do
task <- put session p meth task <- post session p meth
pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode } -- TODO add NodeType pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode } -- TODO add NodeType
where where
p = GR.NodeAPI GT.Node (Just nodeId) (GT.asyncTaskTypePath GT.UpdateNode) p = GR.NodeAPI GT.Node (Just nodeId) "update/nobody"
updateRequest (UpdateNodeParamsGraph meth) session nodeId = do updateRequest (UpdateNodeParamsGraph meth) session nodeId = do
task <- put session p meth task <- post session p meth
pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode } -- TODO add NodeType pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode } -- TODO add NodeType
where where
p = GR.NodeAPI GT.Node (Just nodeId) (GT.asyncTaskTypePath GT.UpdateNode) p = GR.NodeAPI GT.Node (Just nodeId) "update/nobody"
updateRequest (UpdateNodeParamsTexts meth) session nodeId = do updateRequest (UpdateNodeParamsTexts meth) session nodeId = do
task <- put session p meth task <- post session p meth
pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode } -- TODO add NodeType pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode } -- TODO add NodeType
where where
p = GR.NodeAPI GT.Node (Just nodeId) (GT.asyncTaskTypePath GT.UpdateNode) p = GR.NodeAPI GT.Node (Just nodeId) "update/nobody"
updateRequest (UpdateNodeParamsBoard meth) session nodeId = do updateRequest (UpdateNodeParamsBoard meth) session nodeId = do
task <- put session p meth task <- post session p meth
pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode } -- TODO add NodeType pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode } -- TODO add NodeType
where where
p = GR.NodeAPI GT.Node (Just nodeId) (GT.asyncTaskTypePath GT.UpdateNode) p = GR.NodeAPI GT.Node (Just nodeId) "update/nobody"
---------------------------------------------------------------------- ----------------------------------------------------------------------
......
...@@ -498,8 +498,7 @@ asyncTaskTypePath Form = "add/form/async/" ...@@ -498,8 +498,7 @@ asyncTaskTypePath Form = "add/form/async/"
asyncTaskTypePath Query = "query/" asyncTaskTypePath Query = "query/"
asyncTaskTypePath GraphT = "async/" asyncTaskTypePath GraphT = "async/"
asyncTaskTypePath AddNode = "async/nobody/" asyncTaskTypePath AddNode = "async/nobody/"
asyncTaskTypePath UpdateNode = "async/nobody/" asyncTaskTypePath UpdateNode = "update/"
type AsyncTaskID = String type AsyncTaskID = String
......
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