Skip to content

Commit 23795f3

Browse files
authored
Merge pull request #62 from binit2-1/fix-cli
fix: update BASE_URL to include default API endpoint in login and req…
2 parents 560d553 + c62c007 commit 23795f3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/cli/src/commands/login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { composterLoginArtv2 } from "../constants/asciiArts.js";
1111
const __filename = fileURLToPath(import.meta.url);
1212
const __dirname = dirname(__filename);
1313

14-
const BASE_URL = `${process.env.BASE_URL}/auth`;
14+
const BASE_URL = `${process.env.BASE_URL || "https://composter.vercel.app/api"}/auth`;
1515

1616
export async function login() {
1717
console.log(chalk.bold.blue(composterLoginArtv2));

packages/cli/src/utils/request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { handleSessionError } from "./errorHandlers/sessionErrorHandler.js";
44
import { handleFetchError } from "./errorHandlers/fetchErrorHandler.js";
55
import { log } from "./log.js";
66

7-
const BASE_URL = process.env.BASE_URL;
7+
const BASE_URL = process.env.BASE_URL || "https://composter.vercel.app/api";
88

99
export async function apiRequest(path, options = {}) {
1010

0 commit comments

Comments
 (0)