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
83754fdf
Commit
83754fdf
authored
Jan 21, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[API] Add to corpus with query
parent
3b25757d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
API.hs
src/Gargantext/API.hs
+6
-6
New.hs
src/Gargantext/API/Corpus/New.hs
+2
-2
No files found.
src/Gargantext/API.hs
View file @
83754fdf
...
...
@@ -297,7 +297,7 @@ type GargPrivateAPI' =
-- :<|> New.Upload
:<|>
New
.
AddWithForm
--
:<|> New.AddWithQuery
:<|>
New
.
AddWithQuery
-- :<|> New.AddWithFile
-- :<|> "scraper" :> WithCallbacks ScraperAPI
-- :<|> "new" :> New.Api
...
...
@@ -379,17 +379,17 @@ serverPrivateGargAPI' (AuthenticatedUser (NodeId uid))
<$>
PathNode
<*>
treeAPI
-- TODO access
-- :<|> addUpload
-- (\corpus -> addWithQuery corpus :<|> addWithFile corpus)
-- :<|> addWithFile
-- :<|> (\corpus -> addWithQuery corpus :<|> addWithFile corpus)
:<|>
addWithForm
:<|>
addWithQuery
-- :<|> New.api uid -- TODO-SECURITY
-- :<|> New.info uid -- TODO-SECURITY
{-
addUpload :: GargServer New.Upload
addUpload cId =
serveJobsAPI $ JobFunction (\i log -> New.addToCorpusJobFunction cid i (liftIO . log
))
:<|> (serveJobsAPI $ JobFunction (\i log -> New.addToCorpusWithForm
cid i (liftIO . log)))
-}
addUpload cId =
(serveJobsAPI $ JobFunction (\i log -> New.addToCorpusJobFunction cid i (liftIO . log)
))
:<|> (serveJobsAPI $ JobFunction (\i log -> New.addToCorpusWithForm
cid i (liftIO . log)))
-
-
}
addWithQuery
::
GargServer
New
.
AddWithQuery
addWithQuery
cid
=
...
...
src/Gargantext/API/Corpus/New.hs
View file @
83754fdf
...
...
@@ -148,10 +148,10 @@ type Upload = Summary "Corpus Upload endpoint"
type
AddWithQuery
=
Summary
"Add with Query to corpus endpoint"
:>
"
corpus
"
:>
"
query
"
:>
Capture
"corpus_id"
CorpusId
:>
"add"
:>
"
query
"
:>
"
corpus
"
:>
"async"
:>
AsyncJobsAPI
ScraperStatus
WithQuery
ScraperStatus
...
...
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