Skip to content

Commit

Permalink
Merge pull request #955 from appwrite/fix-cli-login-use-endpoint
Browse files Browse the repository at this point in the history
fix: cli login use endpoint
  • Loading branch information
christyjacob4 authored Aug 23, 2024
2 parents e6f78b7 + a9e55d0 commit c0b51dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion templates/cli/lib/commands/generic.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const DEFAULT_ENDPOINT = 'https://cloud.appwrite.io/v1';

const loginCommand = async ({ email, password, endpoint, mfa, code }) => {
const oldCurrent = globalConfig.getCurrentSession();
let configEndpoint = endpoint ?? DEFAULT_ENDPOINT;

const configEndpoint = endpoint ?? globalConfig.getEndpoint() ?? DEFAULT_ENDPOINT;

if (globalConfig.getCurrentSession() !== '') {
log('You are currently signed in as ' + globalConfig.getEmail());
Expand Down
4 changes: 2 additions & 2 deletions templates/cli/lib/commands/init.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ const initFunction = async () => {
$id: functionId,
name: answers.name,
runtime: answers.runtime.id,
execute: [],
execute: ["any"],
events: [],
scopes: [],
scopes: ["users.read"],
schedule: "",
timeout: 15,
enabled: true,
Expand Down
2 changes: 1 addition & 1 deletion templates/cli/lib/questions.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const questionsPullFunctionsCode = [
{
type: "confirm",
name: "override",
message: "Do you want to pull source code of active deployment?"
message: "Do you want to pull source code of the latest deployment?"
},
];

Expand Down

0 comments on commit c0b51dc

Please sign in to comment.