Skip to content

Commit

Permalink
fix: headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ikechan8370 committed Dec 7, 2023
1 parent 2183822 commit 46328a9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apps/management.js
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,11 @@ azure语音:Azure 语音是微软 Azure 平台提供的一项语音服务,
refresh_token: Config.OpenAiPlatformRefreshToken,
client_id: 'DRivsnm2Mu42T3KOpqdtwB3NYviHYzwD',
grant_type: 'refresh_token'
})
}),
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36',
'Content-Type': 'application/json'
}
})
if (refreshRes.status !== 200) {
let errMsg = await refreshRes.json()
Expand All @@ -1364,7 +1368,8 @@ azure语音:Azure 语音是微软 Azure 平台提供的一项语音服务,
let res = await newFetch(`${host}/dashboard/onboarding/login`, {
headers: {
// eslint-disable-next-line camelcase
Authorization: `Bearer ${access_token}`
Authorization: `Bearer ${access_token}`,
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36'
},
method: 'POST'
})
Expand All @@ -1373,7 +1378,7 @@ azure语音:Azure 语音是微软 Azure 平台提供的一项语音服务,
let sess = authRes.user.session.sensitive_id
if (sess) {
Config.apiKey = sess
await e.reply('已成功将sessKey设置为apiKey,您可以发送#open余额来查看该账号余额')
await e.reply('已成功将sessKey设置为apiKey,您可以发送#openai余额来查看该账号余额')
} else {
await e.reply('设置失败!')
}
Expand Down

0 comments on commit 46328a9

Please sign in to comment.