Skip to content

Commit f9ab2b8

Browse files
committed
chore: switch to teamsList for self-hosted
1 parent 6e6e63b commit f9ab2b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/cli/lib/questions.js.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ const questionsInitProject = [
153153
message: "Choose your organization",
154154
choices: async () => {
155155
let client = await sdkForConsole(true);
156-
const { teams } = await paginate(organizationsList, { parseOutput: false, sdk: client }, 100, 'teams');
156+
const { teams } = client.endpoint === "https://cloud.appwrite.io/v1"
157+
? await paginate(organizationsList, { parseOutput: false, sdk: client }, 100, 'teams')
158+
: await paginate(teamsList, { parseOutput: false, sdk: client }, 100, 'teams');
157159

158160
let choices = teams.map((team, idx) => {
159161
return {

0 commit comments

Comments
 (0)