Commit 7384c431 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX/SERV] roots with type id.

parent ca5d3d60
...@@ -20,7 +20,7 @@ import Database.PostgreSQL.Simple (Connection, connect) ...@@ -20,7 +20,7 @@ import Database.PostgreSQL.Simple (Connection, connect)
import Opaleye import Opaleye
import Data.Gargantext.Types.Main (Node, NodeId) import Data.Gargantext.Types.Main (Node, NodeId)
import Data.Gargantext.Database.Node (getNodesWithParentId, getNode) import Data.Gargantext.Database.Node (getNodesWithParentId, getNode, getNodesWithType)
import Data.Gargantext.Database.Private (infoGargandb) import Data.Gargantext.Database.Private (infoGargandb)
-- | TODO, use MOCK feature of Servant to generate fake data (for tests) -- | TODO, use MOCK feature of Servant to generate fake data (for tests)
...@@ -37,7 +37,7 @@ type API = "roots" :> Get '[JSON] [Node Value] ...@@ -37,7 +37,7 @@ type API = "roots" :> Get '[JSON] [Node Value]
server :: Connection -> Server API server :: Connection -> Server API
server conn server conn
= liftIO (getNodesWithParentId conn null) = liftIO (getNodesWithType conn 1)
:<|> nodeAPI conn :<|> nodeAPI conn
:<|> echo :<|> echo
:<|> upload :<|> upload
......
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