Commit 83754fdf authored by Alexandre Delanoë's avatar Alexandre Delanoë

[API] Add to corpus with query

parent 3b25757d
Pipeline #698 failed with stage
......@@ -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))
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 =
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment