mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 18:08:25 +00:00
Add a task to re-process files of an item
This commit is contained in:
@ -279,6 +279,15 @@ object ItemRoutes {
|
||||
resp <- Ok(Conversions.basicResult(res, "Attachment moved."))
|
||||
} yield resp
|
||||
|
||||
case req @ POST -> Root / Ident(id) / "reprocess" =>
|
||||
for {
|
||||
data <- req.as[StringList]
|
||||
ids = data.items.flatMap(s => Ident.fromString(s).toOption)
|
||||
_ <- logger.fdebug(s"Re-process item ${id.id}")
|
||||
res <- backend.upload.reprocess(id, ids, user.account, true)
|
||||
resp <- Ok(Conversions.basicResult(res))
|
||||
} yield resp
|
||||
|
||||
case DELETE -> Root / Ident(id) =>
|
||||
for {
|
||||
n <- backend.item.deleteItem(id, user.account.collective)
|
||||
|
Reference in New Issue
Block a user