mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 10:28:27 +00:00
Update tag counts in search menu
This commit is contained in:
@ -67,6 +67,7 @@ module Api exposing
|
||||
, itemDetail
|
||||
, itemIndexSearch
|
||||
, itemSearch
|
||||
, itemSearchStats
|
||||
, login
|
||||
, loginSession
|
||||
, logout
|
||||
@ -184,6 +185,7 @@ import Api.Model.ReferenceList exposing (ReferenceList)
|
||||
import Api.Model.Registration exposing (Registration)
|
||||
import Api.Model.ScanMailboxSettings exposing (ScanMailboxSettings)
|
||||
import Api.Model.ScanMailboxSettingsList exposing (ScanMailboxSettingsList)
|
||||
import Api.Model.SearchStats exposing (SearchStats)
|
||||
import Api.Model.SentMails exposing (SentMails)
|
||||
import Api.Model.SimpleMail exposing (SimpleMail)
|
||||
import Api.Model.SourceAndTags exposing (SourceAndTags)
|
||||
@ -1702,6 +1704,16 @@ itemSearch flags search receive =
|
||||
}
|
||||
|
||||
|
||||
itemSearchStats : Flags -> ItemSearch -> (Result Http.Error SearchStats -> msg) -> Cmd msg
|
||||
itemSearchStats flags search receive =
|
||||
Http2.authPost
|
||||
{ url = flags.config.baseUrl ++ "/api/v1/sec/item/searchStats"
|
||||
, account = getAccount flags
|
||||
, body = Http.jsonBody (Api.Model.ItemSearch.encode search)
|
||||
, expect = Http.expectJson receive Api.Model.SearchStats.decoder
|
||||
}
|
||||
|
||||
|
||||
itemDetail : Flags -> String -> (Result Http.Error ItemDetail -> msg) -> Cmd msg
|
||||
itemDetail flags id receive =
|
||||
Http2.authGet
|
||||
|
Reference in New Issue
Block a user