Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix(web): Change export format to have content as a top level key

MohamedBassem1f7da9ae38a6
diff --git a/apps/web/app/api/bookmarks/export/route.tsx b/apps/web/app/api/bookmarks/export/route.tsx
index 3b12b878..aefa76b5 100644
--- a/apps/web/app/api/bookmarks/export/route.tsx
+++ b/apps/web/app/api/bookmarks/export/route.tsx
@@ -16,14 +16,17 @@ function toExportFormat(bookmark: ZBookmark) {
: null),
tags: bookmark.tags.map((t) => t.name),
type: bookmark.content.type,
- url:
- bookmark.content.type === BookmarkTypes.LINK
- ? bookmark.content.url
- : undefined,
- text:
- bookmark.content.type === BookmarkTypes.TEXT
- ? bookmark.content.text
- : undefined,
+ content: {
+ type: bookmark.content.type,
+ url:
+ bookmark.content.type === BookmarkTypes.LINK
+ ? bookmark.content.url
+ : undefined,
+ text:
+ bookmark.content.type === BookmarkTypes.TEXT
+ ? bookmark.content.text
+ : undefined,
+ },
note: bookmark.note,
};
}