Skip to content

Commit d9f959d

Browse files
authored
Merge pull request #782 from appwrite/fix-cli-queries
Update CLI to use new query format
2 parents 518042b + 4564f71 commit d9f959d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

templates/cli/lib/commands/deploy.js.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const awaitPools = {
5252
const { total } = await databasesListAttributes({
5353
databaseId,
5454
collectionId,
55-
queries: ['limit(1)'],
55+
queries: [JSON.stringify({ method: 'limit', values: [1] })],
5656
parseOutput: false
5757
});
5858

@@ -83,7 +83,7 @@ const awaitPools = {
8383
const { total } = await databasesListIndexes({
8484
databaseId,
8585
collectionId,
86-
queries: ['limit(100)'],
86+
queries: [JSON.stringify({ method: 'limit', values: [1] })],
8787
parseOutput: false
8888
});
8989

@@ -302,7 +302,7 @@ const deployFunction = async ({ functionId, all, yes } = {}) => {
302302

303303
const { total } = await functionsListVariables({
304304
functionId: func['$id'],
305-
queries: ['limit(1)'],
305+
queries: [JSON.stringify({ method: 'limit', values: [1] })],
306306
parseOutput: false
307307
});
308308

templates/cli/lib/paginate.js.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const paginate = async (action, args = {}, limit = 100, wrapper = '') => {
1010
const response = await action({
1111
...args,
1212
queries: [
13-
`limit(${limit})`,
14-
`offset(${offset})`
13+
JSON.stringify({ method: 'limit', values: [limit] }),
14+
JSON.stringify({ method: 'offset', values: [offset] })
1515
]
1616
});
1717

0 commit comments

Comments
 (0)