aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-07-13 21:08:08 +0000
committerMohamed Bassem <me@mbassem.com>2025-07-13 21:08:08 +0000
commit0addc7bc329671460509d39a841293a321971584 (patch)
treedf65f062b6eda93364f7d509fc2c52663561097a /packages/trpc
parent4ba3e8047a5b1f160169617187436c09e91662ec (diff)
downloadkarakeep-0addc7bc329671460509d39a841293a321971584.tar.zst
Revert "fix: Fix the types of the bookmark types in the db query"
This reverts commit 4ba3e8047a5b1f160169617187436c09e91662ec.
Diffstat (limited to 'packages/trpc')
-rw-r--r--packages/trpc/routers/bookmarks.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/trpc/routers/bookmarks.ts b/packages/trpc/routers/bookmarks.ts
index ef6ce396..9aa9ec1e 100644
--- a/packages/trpc/routers/bookmarks.ts
+++ b/packages/trpc/routers/bookmarks.ts
@@ -187,7 +187,7 @@ async function toZodSchema(
let content: ZBookmarkContent = {
type: BookmarkTypes.UNKNOWN,
};
- if (link) {
+ if (bookmark.link) {
content = {
type: BookmarkTypes.LINK,
screenshotAssetId: assets.find(
@@ -219,7 +219,7 @@ async function toZodSchema(
dateModified: link.dateModified,
};
}
- if (text) {
+ if (bookmark.text) {
content = {
type: BookmarkTypes.TEXT,
// It's ok to include the text content as it's usually not big and is used to render the text bookmark card.
@@ -227,7 +227,7 @@ async function toZodSchema(
sourceUrl: text.sourceUrl,
};
}
- if (asset) {
+ if (bookmark.asset) {
content = {
type: BookmarkTypes.ASSET,
assetType: asset.assetType,