diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-12-29 23:35:28 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-12-29 23:38:21 +0000 |
| commit | f00287ede0675521c783c1199675538571f977d6 (patch) | |
| tree | 2d04b983fa514f4c62a3695c0a521fb50de24eef /tools/compare-models/src/apiClient.ts | |
| parent | ba8d84a555f9e6cf209c826b97a124f0539739eb (diff) | |
| download | karakeep-f00287ede0675521c783c1199675538571f977d6.tar.zst | |
refactor: reduce duplication in compare-models tool
Diffstat (limited to 'tools/compare-models/src/apiClient.ts')
| -rw-r--r-- | tools/compare-models/src/apiClient.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/compare-models/src/apiClient.ts b/tools/compare-models/src/apiClient.ts index f3a960cb..1d9f799d 100644 --- a/tools/compare-models/src/apiClient.ts +++ b/tools/compare-models/src/apiClient.ts @@ -53,7 +53,13 @@ export class KarakeepAPIClient { const batchBookmarks = (data?.bookmarks || []) .filter((b) => b.content?.type === "link") - .map((b) => b as Bookmark); + .map((b) => ({ + ...b, + tags: (b.tags || []).map((tag) => ({ + name: tag.name, + attachedBy: tag.attachedBy, + })), + })) as Bookmark[]; bookmarks.push(...batchBookmarks); cursor = data?.nextCursor || null; |
