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
18fa0db7
Commit
18fa0db7
authored
Feb 18, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[static] fix API ordering
Static (at root) has to be last so that API matches.
parent
3991d01e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
API.hs
src/Gargantext/API.hs
+2
-11
No files found.
src/Gargantext/API.hs
View file @
18fa0db7
...
@@ -318,9 +318,8 @@ type GargPrivateAPI' =
...
@@ -318,9 +318,8 @@ type GargPrivateAPI' =
---------------------------------------------------------------------
---------------------------------------------------------------------
type
API
=
SwaggerAPI
type
API
=
SwaggerAPI
:<|>
FrontEndAPI
-- :<|> Get '[HTML] Html
:<|>
GargAPI
:<|>
GargAPI
:<|>
FrontEndAPI
-- This is the concrete monad. It needs to be used as little as possible,
-- This is the concrete monad. It needs to be used as little as possible,
-- instead, prefer GargServer, GargServerT, GargServerC.
-- instead, prefer GargServer, GargServerT, GargServerC.
...
@@ -340,9 +339,8 @@ server :: forall env. EnvC env => env -> IO (Server API)
...
@@ -340,9 +339,8 @@ server :: forall env. EnvC env => env -> IO (Server API)
server
env
=
do
server
env
=
do
-- orchestrator <- scrapyOrchestrator env
-- orchestrator <- scrapyOrchestrator env
pure
$
schemaUiServer
swaggerDoc
pure
$
schemaUiServer
swaggerDoc
:<|>
frontEndServer
-- :<|> serverStatic
:<|>
hoistServerWithContext
(
Proxy
::
Proxy
GargAPI
)
(
Proxy
::
Proxy
AuthContext
)
transform
serverGargAPI
:<|>
hoistServerWithContext
(
Proxy
::
Proxy
GargAPI
)
(
Proxy
::
Proxy
AuthContext
)
transform
serverGargAPI
:<|>
frontEndServer
where
where
transform
::
forall
a
.
GargServerM
env
GargError
a
->
Handler
a
transform
::
forall
a
.
GargServerM
env
GargError
a
->
Handler
a
transform
=
Handler
.
withExceptT
showAsServantErr
.
(`
runReaderT
`
env
)
transform
=
Handler
.
withExceptT
showAsServantErr
.
(`
runReaderT
`
env
)
...
@@ -416,13 +414,6 @@ addWithForm cid =
...
@@ -416,13 +414,6 @@ addWithForm cid =
serveJobsAPI
$
serveJobsAPI
$
JobFunction
(
\
i
log
->
New
.
addToCorpusWithForm
cid
i
(
liftIO
.
log
))
JobFunction
(
\
i
log
->
New
.
addToCorpusWithForm
cid
i
(
liftIO
.
log
))
serverStatic
::
Server
(
Get
'[
H
TML
]
Html
)
serverStatic
=
$
(
do
let
path
=
"purescript-gargantext/dist/index.html"
Just
s
<-
liftIO
(
fileTypeToFileTree
(
FileTypeFile
path
))
fileTreeToServer
s
)
---------------------------------------------------------------------
---------------------------------------------------------------------
--gargMock :: Server GargAPI
--gargMock :: Server GargAPI
--gargMock = mock apiGarg Proxy
--gargMock = mock apiGarg Proxy
...
...
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