Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
165
Issues
165
List
Board
Labels
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
7384c431
Commit
7384c431
authored
Feb 01, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX/SERV] roots with type id.
parent
ca5d3d60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Server.hs
src/Data/Gargantext/Server.hs
+2
-2
No files found.
src/Data/Gargantext/Server.hs
View file @
7384c431
...
@@ -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
(
getNodesWith
ParentId
conn
null
)
=
liftIO
(
getNodesWith
Type
conn
1
)
:<|>
nodeAPI
conn
:<|>
nodeAPI
conn
:<|>
echo
:<|>
echo
:<|>
upload
:<|>
upload
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment