fix: CLI auth uses login field and port 3000

swadhinbiswas committed 9 months ago
1138512
1 parent 69f5af6
commit 1138512
1 file changed
+4 -4
Showing 1 changed file+4-4
▼cli/src/commands/auth.ts
+4-4
17
17
authCommands
18
18
.command("login")
19
19
.description("Login to OpenCodeHub")
20
- .option("-u, --url <url>", "OpenCodeHub server URL", "http://localhost:4321")
20
+ .option("-u, --url <url>", "OpenCodeHub server URL", "http://localhost:3000")
21
21
.option("-t, --token <token>", "Personal access token")
22
22
.action(async (options) => {
23
23
console.log(chalk.blue("\n🔐 OpenCodeHub Login\n"));
30
30
const answers = await inquirer.prompt([
31
31
{
32
32
type: "input",
33
- name: "email",
34
- message: "Email:",
33
+ name: "login",
34
+ message: "Username or Email:",
35
35
},
36
36
{
37
37
type: "password",
45
45
46
46
// Call auth API
47
47
const response = await apiCall(options.url, "/api/auth/login", "POST", {
48
- email: answers.email,
48
+ login: answers.login,
49
49
password: answers.password,
50
50
});
51
51
52
52