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
148
Issues
148
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
8a09010d
Commit
8a09010d
authored
Jun 22, 2019
by
Przemyslaw Kaminski
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upload: some attempts to add query param "fileType" to upload api
parent
7d6d74c4
Pipeline
#488
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
Node.hs
src/Gargantext/API/Node.hs
+9
-2
No files found.
src/Gargantext/API/Node.hs
View file @
8a09010d
...
...
@@ -398,6 +398,8 @@ getMetrics cId maybeListId tabType maybeLimit = do
-------------------------------------------------------------
type
Hash
=
Text
data
FileType
=
CSV
|
PresseRIS
deriving
(
Eq
,
Show
)
instance
ToParamSchema
(
MultipartData
Mem
)
where
toParamSchema
_
=
toParamSchema
(
Proxy
::
Proxy
TODO
)
...
...
@@ -417,10 +419,15 @@ instance (ToParamSchema a, HasSwagger sub) =>
type
UploadAPI
=
Summary
"Upload file(s) to a corpus"
:>
MultipartForm
Mem
(
MultipartData
Mem
)
:>
QueryParam
"fileType"
FileType
:>
Post
'[
J
SON
]
[
Hash
]
postUpload
::
NodeId
->
GargServer
UploadAPI
postUpload
_
multipartData
=
do
--postUpload :: NodeId -> Maybe FileType -> GargServer UploadAPI
--postUpload :: NodeId -> GargServer UploadAPI
postUpload
::
NodeId
->
Maybe
FileType
->
MultipartData
Mem
->
Cmd
err
[
Hash
]
postUpload
_
Nothing
_
=
panic
"fileType is a required parameter"
postUpload
_
(
Just
fileType
)
multipartData
=
do
putStrLn
$
"File Type: "
<>
(
show
fileType
)
is
<-
liftIO
$
do
putStrLn
(
"Inputs:"
::
Text
)
forM
(
inputs
multipartData
)
$
\
input
->
do
...
...
Przemyslaw Kaminski
@cgenie
mentioned in issue
purescript-gargantext#68 (closed)
·
Jun 22, 2019
mentioned in issue
purescript-gargantext#68 (closed)
mentioned in issue purescript-gargantext#68
Toggle commit list
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