Make item queries depend on the account-id

Now the user is required, too, to list items.
This commit is contained in:
Eike Kettner
2020-07-11 21:54:51 +02:00
parent e66c501056
commit 5b95fddf3d
5 changed files with 22 additions and 22 deletions

View File

@ -30,7 +30,7 @@ trait OFulltext[F[_]] {
def findIndexOnly(
fts: OFulltext.FtsInput,
collective: Ident,
account: AccountId,
batch: Batch
): F[Vector[OFulltext.FtsItemWithTags]]
@ -94,12 +94,12 @@ object OFulltext {
def findIndexOnly(
ftsQ: OFulltext.FtsInput,
collective: Ident,
account: AccountId,
batch: Batch
): F[Vector[OFulltext.FtsItemWithTags]] = {
val fq = FtsQuery(
ftsQ.query,
collective,
account.collective,
Set.empty,
batch.limit,
batch.offset,
@ -113,8 +113,8 @@ object OFulltext {
store
.transact(
QItem.findItemsWithTags(
collective,
QItem.findSelectedItems(QItem.Query.empty(collective), select)
account.collective,
QItem.findSelectedItems(QItem.Query.empty(account), select)
)
)
.take(batch.limit.toLong)
@ -182,7 +182,7 @@ object OFulltext {
val sqlResult = search(q, batch)
val fq = FtsQuery(
ftsQ.query,
q.collective,
q.account.collective,
Set.empty,
0,
0,

View File

@ -107,7 +107,7 @@ object OItemSearch {
val search = QItem.findItems(q, batch)
store
.transact(
QItem.findItemsWithTags(q.collective, search).take(batch.limit.toLong)
QItem.findItemsWithTags(q.account.collective, search).take(batch.limit.toLong)
)
.compile
.toVector