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
40e579a7
Commit
40e579a7
authored
Jan 19, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX][API] upload url encoded OK
parent
4042f99e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
New.hs
src/Gargantext/API/Corpus/New.hs
+6
-5
No files found.
src/Gargantext/API/Corpus/New.hs
View file @
40e579a7
...
...
@@ -24,6 +24,7 @@ New corpus means either:
module
Gargantext.API.Corpus.New
where
--import Debug.Trace (trace)
import
Web.FormUrlEncoded
(
FromForm
)
import
Data.Either
import
Control.Monad.IO.Class
(
liftIO
)
...
...
@@ -172,7 +173,7 @@ type
AddAPI
withInput
=
AsyncJobsAPI
ScraperStatus
withInput
ScraperStatus
------------------------------------------------------------------------
type
AddWithQuery
=
Summary
"Add to corpus endpoint"
type
AddWithQuery
=
Summary
"Add
with Query
to corpus endpoint"
:>
"corpus"
:>
Capture
"corpus_id"
CorpusId
:>
"add"
...
...
@@ -180,7 +181,7 @@ type AddWithQuery = Summary "Add to corpus endpoint"
:>
"async"
:>
AddAPI
WithQuery
type
AddWithFile
=
Summary
"Add to corpus endpoint"
type
AddWithFile
=
Summary
"Add
with MultipartData
to corpus endpoint"
:>
"corpus"
:>
Capture
"corpus_id"
CorpusId
:>
"add"
...
...
@@ -190,7 +191,7 @@ type AddWithFile = Summary "Add to corpus endpoint"
:>
"async"
:>
AddAPI
()
type
AddWithForm
=
Summary
"Add to corpus endpoint"
type
AddWithForm
=
Summary
"Add
with FormUrlEncoded
to corpus endpoint"
:>
"corpus"
:>
Capture
"corpus_id"
CorpusId
:>
"add"
...
...
@@ -247,13 +248,13 @@ addToCorpusWithForm :: FlowCmdM env err m
->
(
ScraperStatus
->
m
()
)
->
m
ScraperStatus
addToCorpusWithForm
_cid
(
WithForm
ft
d
)
logStatus
=
do
printDebug
"filetype"
ft
putStrLn
(
"data"
<>
show
d
)
logStatus
ScraperStatus
{
_scst_succeeded
=
Just
10
,
_scst_failed
=
Just
2
,
_scst_remaining
=
Just
138
,
_scst_events
=
Just
[]
}
_
<-
putStrLn
$
show
ft
_
<-
putStrLn
$
show
d
pure
ScraperStatus
{
_scst_succeeded
=
Just
137
,
_scst_failed
=
Just
13
...
...
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