mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Change "empty trash" settings for a collective and submit the job
This commit is contained in:
@ -55,7 +55,8 @@ object CollectiveRoutes {
|
||||
settings.classifier.categoryList,
|
||||
settings.classifier.listType
|
||||
)
|
||||
)
|
||||
),
|
||||
Some(settings.emptyTrashSchedule)
|
||||
)
|
||||
res <-
|
||||
backend.collective
|
||||
@ -70,6 +71,7 @@ object CollectiveRoutes {
|
||||
CollectiveSettings(
|
||||
c.language,
|
||||
c.integrationEnabled,
|
||||
c.emptyTrash.getOrElse(CalEvent.unsafe("*-*-1/7 03:00:00")),
|
||||
ClassifierSetting(
|
||||
c.classifier.map(_.itemCount).getOrElse(0),
|
||||
c.classifier
|
||||
@ -101,6 +103,12 @@ object CollectiveRoutes {
|
||||
resp <- Ok(BasicResult(true, "Task submitted"))
|
||||
} yield resp
|
||||
|
||||
case POST -> Root / "emptytrash" / "startonce" =>
|
||||
for {
|
||||
_ <- backend.collective.startEmptyTrash(user.account.collective)
|
||||
resp <- Ok(BasicResult(true, "Task submitted"))
|
||||
} yield resp
|
||||
|
||||
case GET -> Root =>
|
||||
for {
|
||||
collDb <- backend.collective.find(user.account.collective)
|
||||
|
Reference in New Issue
Block a user