From 7e446541868b9bd3e7af876da4f378d4f0b8db69 Mon Sep 17 00:00:00 2001 From: Sarah Etter Date: Tue, 17 Dec 2024 19:34:09 -0500 Subject: [PATCH] fix: remove extra call to accounts endpoint from sites:create-template --- src/commands/sites/sites-create-template.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/sites/sites-create-template.ts b/src/commands/sites/sites-create-template.ts index dadc1dea2e3..1b232912aa3 100644 --- a/src/commands/sites/sites-create-template.ts +++ b/src/commands/sites/sites-create-template.ts @@ -1,10 +1,11 @@ +import path from 'node:path' +import { fileURLToPath } from 'node:url' + import { OptionValues } from 'commander' import inquirer from 'inquirer' import pick from 'lodash/pick.js' import { render } from 'prettyjson' import { v4 as uuid } from 'uuid' -import path from 'node:path' -import { fileURLToPath } from 'node:url' import { chalk, @@ -30,7 +31,7 @@ import BaseCommand from '../base-command.js' import { getSiteNameInput } from './sites-create.js' export const sitesCreateTemplate = async (repository: string, options: OptionValues, command: BaseCommand) => { - const { api } = command.netlify + const { accounts, api } = command.netlify await command.authenticate() const { globalConfig } = command.netlify @@ -52,7 +53,6 @@ export const sitesCreateTemplate = async (repository: string, options: OptionVal error(`${getTerminalLink(chalk.bold(templateName), githubLink)} is not a valid GitHub template`) return } - const accounts = await api.listAccountsForUser() let { accountSlug } = options