mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Refactor findItemsWithTags to more general useful
This commit is contained in:
@ -110,11 +110,15 @@ object OItemSearch {
|
||||
.compile
|
||||
.toVector
|
||||
|
||||
def findItemsWithTags(q: Query, batch: Batch): F[Vector[ListItemWithTags]] =
|
||||
def findItemsWithTags(q: Query, batch: Batch): F[Vector[ListItemWithTags]] = {
|
||||
val search = QItem.findItems(q, batch)
|
||||
store
|
||||
.transact(QItem.findItemsWithTags(q, batch).take(batch.limit.toLong))
|
||||
.transact(
|
||||
QItem.findItemsWithTags(q.collective, search).take(batch.limit.toLong)
|
||||
)
|
||||
.compile
|
||||
.toVector
|
||||
}
|
||||
|
||||
def findAttachment(id: Ident, collective: Ident): F[Option[AttachmentData[F]]] =
|
||||
store
|
||||
|
Reference in New Issue
Block a user