diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-07-13 10:33:47 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-07-13 20:44:00 +0000 |
| commit | 4ba3e8047a5b1f160169617187436c09e91662ec (patch) | |
| tree | 6596ef1c5a66840e335289f9c9447ab07671cca2 /packages/trpc | |
| parent | d1d5263486f96db578aad918a59007045c3c077f (diff) | |
| download | karakeep-4ba3e8047a5b1f160169617187436c09e91662ec.tar.zst | |
fix: Fix the types of the bookmark types in the db query
Diffstat (limited to 'packages/trpc')
| -rw-r--r-- | packages/trpc/routers/bookmarks.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/trpc/routers/bookmarks.ts b/packages/trpc/routers/bookmarks.ts index 9aa9ec1e..ef6ce396 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 (bookmark.link) { + if (link) { content = { type: BookmarkTypes.LINK, screenshotAssetId: assets.find( @@ -219,7 +219,7 @@ async function toZodSchema( dateModified: link.dateModified, }; } - if (bookmark.text) { + if (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 (bookmark.asset) { + if (asset) { content = { type: BookmarkTypes.ASSET, assetType: asset.assetType, |
