From 1f7da9ae38a6f6304f8ab78271e4331614c450f9 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Sat, 5 Oct 2024 14:48:39 +0000 Subject: fix(web): Change export format to have content as a top level key --- apps/web/app/api/bookmarks/export/route.tsx | 19 +++++++++++-------- 1 file 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, }; } -- cgit v1.2.3-70-g09d2