mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
Add start-now button for train-classifier task
This commit is contained in:
@ -88,6 +88,7 @@ module Api exposing
|
||||
, setItemNotes
|
||||
, setTags
|
||||
, setUnconfirmed
|
||||
, startClassifier
|
||||
, startOnceNotifyDueItems
|
||||
, startOnceScanMailbox
|
||||
, startReIndex
|
||||
@ -795,6 +796,19 @@ versionInfo flags receive =
|
||||
--- Collective
|
||||
|
||||
|
||||
startClassifier :
|
||||
Flags
|
||||
-> (Result Http.Error BasicResult -> msg)
|
||||
-> Cmd msg
|
||||
startClassifier flags receive =
|
||||
Http2.authPost
|
||||
{ url = flags.config.baseUrl ++ "/api/v1/sec/collective/classifier/startonce"
|
||||
, account = getAccount flags
|
||||
, body = Http.emptyBody
|
||||
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
|
||||
}
|
||||
|
||||
|
||||
getTagCloud : Flags -> (Result Http.Error TagCloud -> msg) -> Cmd msg
|
||||
getTagCloud flags receive =
|
||||
Http2.authGet
|
||||
|
Reference in New Issue
Block a user