Skip to content

Commit

Permalink
fix(web): Change export format to have content as a top level key
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Oct 5, 2024
1 parent 3f22801 commit 1f7da9a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions apps/web/app/api/bookmarks/export/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}
Expand Down

0 comments on commit 1f7da9a

Please sign in to comment.