Allow a collective to re-index their data

If something goes wrong, this might be necessary.
This commit is contained in:
Eike Kettner
2020-06-25 21:52:38 +02:00
parent c81b92af6d
commit 4a41168bbb
2 changed files with 129 additions and 4 deletions

View File

@ -78,6 +78,7 @@ module Api exposing
, setUnconfirmed
, startOnceNotifyDueItems
, startOnceScanMailbox
, startReIndex
, submitNotifyDueItems
, updateNotifyDueItems
, updateScanMailbox
@ -149,6 +150,20 @@ import Util.Http as Http2
--- Full-Text
startReIndex : Flags -> (Result Http.Error BasicResult -> msg) -> Cmd msg
startReIndex flags receive =
Http2.authPost
{ url = flags.config.baseUrl ++ "/api/v1/sec/fts/reIndex"
, account = getAccount flags
, body = Http.emptyBody
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
}
--- Scan Mailboxes