fix trash in search (#1439)

- delete share if page is trashed
This commit is contained in:
Philip Okugbe
2025-08-02 00:14:00 +01:00
committed by GitHub
parent 83bc273cb0
commit 1cb2535de3
4 changed files with 28 additions and 15 deletions
@@ -59,6 +59,7 @@ export class SearchService {
.$if(Boolean(searchParams.creatorId), (qb) =>
qb.where('creatorId', '=', searchParams.creatorId),
)
.where('deletedAt', 'is', null)
.orderBy('rank', 'desc')
.limit(searchParams.limit | 20)
.offset(searchParams.offset || 0);
@@ -191,6 +192,7 @@ export class SearchService {
sql`LOWER(f_unaccent(${`%${query}%`}))`,
),
)
.where('deletedAt', 'is', null)
.where('workspaceId', '=', workspaceId)
.limit(limit);