mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 10:28:27 +00:00
Use a minimum age of items to remove
In order to keep deleted items for a while, the periodic task can now use a duration to only remove items with a certain age. This can be used to ensure that a deleted item stays at least X days before it will be removed from the database. Refs: #347
This commit is contained in:
@ -158,6 +158,7 @@ import Api.Model.CustomFieldValue exposing (CustomFieldValue)
|
||||
import Api.Model.DirectionValue exposing (DirectionValue)
|
||||
import Api.Model.EmailSettings exposing (EmailSettings)
|
||||
import Api.Model.EmailSettingsList exposing (EmailSettingsList)
|
||||
import Api.Model.EmptyTrashSetting exposing (EmptyTrashSetting)
|
||||
import Api.Model.Equipment exposing (Equipment)
|
||||
import Api.Model.EquipmentList exposing (EquipmentList)
|
||||
import Api.Model.FolderDetail exposing (FolderDetail)
|
||||
@ -999,13 +1000,14 @@ startClassifier flags receive =
|
||||
|
||||
startEmptyTrash :
|
||||
Flags
|
||||
-> EmptyTrashSetting
|
||||
-> (Result Http.Error BasicResult -> msg)
|
||||
-> Cmd msg
|
||||
startEmptyTrash flags receive =
|
||||
startEmptyTrash flags setting receive =
|
||||
Http2.authPost
|
||||
{ url = flags.config.baseUrl ++ "/api/v1/sec/collective/emptytrash/startonce"
|
||||
, account = getAccount flags
|
||||
, body = Http.emptyBody
|
||||
, body = Http.jsonBody (Api.Model.EmptyTrashSetting.encode setting)
|
||||
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user