mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Delete items by introducing a deleted state
When deleting items via the http api, they are not deleted anymore but a new status "Deleted" is set. The collective insights contains now a count separately for deleted items.
This commit is contained in:
@ -144,6 +144,8 @@ trait OItem[F[_]] {
|
||||
|
||||
def deleteAttachment(id: Ident, collective: Ident): F[Int]
|
||||
|
||||
def setDeletedState(items: NonEmptyList[Ident], collective: Ident): F[Int]
|
||||
|
||||
def deleteAttachmentMultiple(
|
||||
attachments: NonEmptyList[Ident],
|
||||
collective: Ident
|
||||
@ -612,6 +614,9 @@ object OItem {
|
||||
n = results.sum
|
||||
} yield n
|
||||
|
||||
def setDeletedState(items: NonEmptyList[Ident], collective: Ident): F[Int] =
|
||||
store.transact(RItem.setState(items, collective, ItemState.Deleted))
|
||||
|
||||
def getProposals(item: Ident, collective: Ident): F[MetaProposalList] =
|
||||
store.transact(QAttachment.getMetaProposals(item, collective))
|
||||
|
||||
|
Reference in New Issue
Block a user