Commit b0c373a2 authored by Karen Konou's avatar Karen Konou

Fix share url API

parent 5742cfee
Pipeline #5671 passed with stages
in 92 minutes and 42 seconds
......@@ -7,7 +7,7 @@ import Data.Text
import Gargantext.Prelude
import Gargantext.API.Prelude
import Servant
import Gargantext.Core.Types (NodeType, NodeId)
import Gargantext.Core.Types (NodeType, NodeId, unNodeId)
import Gargantext.Database.Prelude (HasConfig (hasConfig), CmdCommon)
import Control.Lens.Getter (view)
import Gargantext.Prelude.Config (gc_url)
......@@ -33,4 +33,4 @@ getUrl nt id = do
Nothing -> pure "Invalid node ID"
Just i -> do
url <- view $ hasConfig . gc_url
pure $ url <> "/#/share/" <> show t <> "/" <> show i
pure $ url <> "/#/share/" <> show t <> "/" <> show (unNodeId i)
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