Commit 9ec52356 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[PHYLO.API] REST GET.

parent 87fcabcc
Pipeline #337 canceled with stage
......@@ -143,8 +143,11 @@ type NodeAPI a = Get '[JSON] (Node a)
:<|> "list" :> TableNgramsApi
:<|> "listGet" :> TableNgramsApiGet
:<|> "pairing" :> PairingApi
-- VIZ
:<|> "chart" :> ChartApi
:<|> "phylo" :> PhyloAPI
:<|> "favorites" :> FavApi
:<|> "documents" :> DocsApi
:<|> "search":> Summary "Node Search"
......@@ -188,6 +191,8 @@ nodeAPI p uId id
:<|> getPairing id
:<|> getChart id
:<|> phyloAPI id
:<|> favApi id
:<|> delDocs id
:<|> searchIn id
......@@ -311,6 +316,15 @@ graphAPI nId = do
liftIO $ set graph_metadata (Just metadata) <$> cooc2graph myCooc
type PhyloAPI = Summary "Phylo API"
:> QueryParam "param" PhyloQueryView
:> Get '[JSON] PhyloView
phyloAPI :: NodeId -> GargServer PhyloAPI
phyloAPI n q = pure $ getPhylo n q
instance HasNodeError ServantErr where
_NodeError = prism' mk (const Nothing) -- $ panic "HasNodeError ServantErr: not a prism")
where
......
......@@ -21,7 +21,7 @@ import Gargantext.Prelude
import Gargantext.Viz.Phylo
import Gargantext.Viz.Phylo.Example
getPhylo :: PhyloId -> PhyloQueryView -> PhyloView
getPhylo :: PhyloId -> Maybe PhyloQueryView -> PhyloView
getPhylo _phyloId _phyloQueryView = phyloView
postPhylo :: CorpusId -> Maybe ListId -> PhyloQueryBuild -> Phylo
......
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