aboutsummaryrefslogtreecommitdiffstats
path: root/apps/cli/src/commands/lists.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/cli/src/commands/lists.ts')
-rw-r--r--apps/cli/src/commands/lists.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/cli/src/commands/lists.ts b/apps/cli/src/commands/lists.ts
index 4b157cdf..57b6d948 100644
--- a/apps/cli/src/commands/lists.ts
+++ b/apps/cli/src/commands/lists.ts
@@ -89,9 +89,17 @@ listsCmd
.action(async (opts) => {
const api = getAPIClient();
try {
- const results = await api.lists.get.query({ listId: opts.list });
+ let resp = await api.bookmarks.getBookmarks.query({ listId: opts.list });
+ let results: string[] = resp.bookmarks.map((b) => b.id);
+ while (resp.nextCursor) {
+ resp = await api.bookmarks.getBookmarks.query({
+ listId: opts.list,
+ cursor: resp.nextCursor,
+ });
+ results = [...results, ...resp.bookmarks.map((b) => b.id)];
+ }
- printObject(results.bookmarks);
+ printObject(results);
} catch (error) {
printErrorMessageWithReason(
"Failed to get the ids of the bookmarks in the list",