Skip to content

Commit d74c037

Browse files
committed
chore: used hostname for check
1 parent 3bbe263 commit d74c037

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/cli/lib/questions.js.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ const questionsInitProject = [
153153
message: "Choose your organization",
154154
choices: async () => {
155155
let client = await sdkForConsole(true);
156-
const { teams } = /.*appwrite\.io/.test(client.endpoint)
156+
const hostname = new URL(client.endpoint).hostname;
157+
const { teams } = hostname.endsWith('appwrite.io')
157158
? await paginate(organizationsList, { parseOutput: false, sdk: client }, 100, 'teams')
158159
: await paginate(teamsList, { parseOutput: false, sdk: client }, 100, 'teams');
159160

0 commit comments

Comments
 (0)