From fa8286aa900ea4f13c1c15d5b0f441436f042d8a Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 3 Nov 2024 17:30:17 +0000 Subject: feature(web): Add the ability to view the bookmarks of a particular rss feed --- packages/trpc/routers/bookmarks.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'packages/trpc/routers/bookmarks.ts') diff --git a/packages/trpc/routers/bookmarks.ts b/packages/trpc/routers/bookmarks.ts index 9a27c25a..4e58bcdc 100644 --- a/packages/trpc/routers/bookmarks.ts +++ b/packages/trpc/routers/bookmarks.ts @@ -18,6 +18,7 @@ import { bookmarksInLists, bookmarkTags, bookmarkTexts, + rssFeedImportsTable, tagsOnBookmarks, } from "@hoarder/db/schema"; import { deleteAsset } from "@hoarder/shared/assetdb"; @@ -591,6 +592,19 @@ export const bookmarksAppRouter = router({ ), ) : undefined, + input.rssFeedId !== undefined + ? exists( + ctx.db + .select() + .from(rssFeedImportsTable) + .where( + and( + eq(rssFeedImportsTable.bookmarkId, bookmarks.id), + eq(rssFeedImportsTable.rssFeedId, input.rssFeedId), + ), + ), + ) + : undefined, input.listId !== undefined ? exists( ctx.db -- cgit v1.2.3-70-g09d2