fix bug
This commit is contained in:
@@ -442,7 +442,7 @@ export const accountController = {
|
||||
// Claude 登录处理
|
||||
async function handleClaudeLogin(token: string, userName: string): Promise<string> {
|
||||
try {
|
||||
const baseUrl = process.env.CLAUDE_TARGET_URL || 'https://chat.micar9.com:8443';
|
||||
const baseUrl = process.env.CLAUDE_TARGET_URL || 'https://chat.micar9.com';
|
||||
console.log('Claude登录处理:', { token, userName });
|
||||
// 第一步:获取oauth token
|
||||
const oauthResponse = await fetch(`${baseUrl}/manage-api/auth/oauth_token`, {
|
||||
@@ -476,7 +476,7 @@ async function handleClaudeLogin(token: string, userName: string): Promise<strin
|
||||
// ChatGPT 登录处理
|
||||
async function handleChatGPTLogin(token: string, userName: string): Promise<string> {
|
||||
try {
|
||||
const baseUrl = process.env.CLAUDE_TARGET_URL || 'http://127.0.0.1:8181';
|
||||
const baseUrl = process.env.CHATGPT_TARGET_URL || 'http://127.0.0.1:8181';
|
||||
|
||||
const response = await fetch(`${baseUrl}/api/login`, {
|
||||
method: 'POST',
|
||||
@@ -512,7 +512,7 @@ async function handleChatGPTLogin(token: string, userName: string): Promise<stri
|
||||
// Grok 登录处理
|
||||
async function handleGrokLogin(token: string, userName: string): Promise<string> {
|
||||
try {
|
||||
const baseUrl = process.env.CLAUDE_TARGET_URL || 'https://grok-mirror.micar9.com:8443';
|
||||
const baseUrl = process.env.GROK_TARGET_URL || 'https://grok-mirror.micar9.com';
|
||||
|
||||
const response = await fetch(`${baseUrl}/api/login-v2`, {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user