aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/app/api/bookmarks/export
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/app/api/bookmarks/export')
-rw-r--r--apps/web/app/api/bookmarks/export/route.tsx19
1 files changed, 11 insertions, 8 deletions
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,
};
}