Commit b0c373a2 authored by Karen Konou's avatar Karen Konou

Fix share url API

parent 5742cfee
...@@ -7,7 +7,7 @@ import Data.Text ...@@ -7,7 +7,7 @@ import Data.Text
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.API.Prelude import Gargantext.API.Prelude
import Servant import Servant
import Gargantext.Core.Types (NodeType, NodeId) import Gargantext.Core.Types (NodeType, NodeId, unNodeId)
import Gargantext.Database.Prelude (HasConfig (hasConfig), CmdCommon) import Gargantext.Database.Prelude (HasConfig (hasConfig), CmdCommon)
import Control.Lens.Getter (view) import Control.Lens.Getter (view)
import Gargantext.Prelude.Config (gc_url) import Gargantext.Prelude.Config (gc_url)
...@@ -33,4 +33,4 @@ getUrl nt id = do ...@@ -33,4 +33,4 @@ getUrl nt id = do
Nothing -> pure "Invalid node ID" Nothing -> pure "Invalid node ID"
Just i -> do Just i -> do
url <- view $ hasConfig . gc_url 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