Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Przemyslaw Kaminski
haskell-gargantext
Commits
9af716d1
Commit
9af716d1
authored
Feb 13, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[COSMETICS]
parent
dc3afe64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
API.hs
src/Gargantext/API.hs
+10
-6
No files found.
src/Gargantext/API.hs
View file @
9af716d1
...
...
@@ -284,7 +284,7 @@ server env = do
-- orchestrator <- scrapyOrchestrator env
pure
$
swaggerFront
:<|>
hoistServer
(
Proxy
::
Proxy
GargAPI
)
(`
runReaderT
`
env
)
serverGargAPI
:<|>
server
Index
:<|>
server
Static
serverGargAPI
::
GargServer
GargAPI
serverGargAPI
-- orchestrator
...
...
@@ -302,9 +302,12 @@ serverGargAPI -- orchestrator
where
fakeUserId
=
1
-- TODO
serverIndex
::
Server
(
Get
'[
H
TML
]
Html
)
serverIndex
=
$
(
do
(
Just
s
)
<-
liftIO
(
fileTypeToFileTree
(
FileTypeFile
"purescript-gargantext/dist/index.html"
))
fileTreeToServer
s
)
serverStatic
::
Server
(
Get
'[
H
TML
]
Html
)
serverStatic
=
$
(
do
let
path
=
"purescript-gargantext/dist/index.html"
Just
s
<-
liftIO
(
fileTypeToFileTree
(
FileTypeFile
path
))
fileTreeToServer
s
)
---------------------------------------------------------------------
swaggerFront
::
Server
SwaggerFrontAPI
...
...
@@ -315,11 +318,12 @@ gargMock :: Server GargAPI
gargMock
=
mock
apiGarg
Proxy
---------------------------------------------------------------------
makeApp
::
(
HasConnection
env
,
HasRepoVar
env
,
HasRepoSaver
env
)
=>
env
->
IO
Application
makeApp
::
(
HasConnection
env
,
HasRepoVar
env
,
HasRepoSaver
env
)
=>
env
->
IO
Application
makeApp
=
fmap
(
serve
api
)
.
server
appMock
::
Application
appMock
=
serve
api
(
swaggerFront
:<|>
gargMock
:<|>
server
Index
)
appMock
=
serve
api
(
swaggerFront
:<|>
gargMock
:<|>
server
Static
)
---------------------------------------------------------------------
api
::
Proxy
API
...
...
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