mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-29 07:56:06 +08:00
修复goCqHttpBotToken中存在&字符导致认证失败的问题
修改goCqHttpBot鉴权方式,调整为使用Header模式,此处回调函数可使用[send_msg 发送消息](https://github.com/botuniverse/onebot-11/blob/master/api/public.md#send_msg-%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF)API来实现更为优雅的前端配置方式,但考虑到需要同时修改前后端,暂不提交
This commit is contained in:
parent
3f12d9cbd5
commit
7c9f892de3
|
@ -91,11 +91,12 @@ export default class NotificationService {
|
||||||
const { goCqHttpBotQq, goCqHttpBotToken, goCqHttpBotUrl } = this.params;
|
const { goCqHttpBotQq, goCqHttpBotToken, goCqHttpBotUrl } = this.params;
|
||||||
const res: any = await got
|
const res: any = await got
|
||||||
.post(
|
.post(
|
||||||
`${goCqHttpBotUrl}?access_token=${goCqHttpBotToken}&${goCqHttpBotQq}`,
|
`${goCqHttpBotUrl}?${goCqHttpBotQq}`,
|
||||||
{
|
{
|
||||||
timeout: this.timeout,
|
timeout: this.timeout,
|
||||||
retry: 0,
|
retry: 0,
|
||||||
json: { message: `${this.title}\n${this.content}` },
|
json: { message: `${this.title}\n${this.content}` },
|
||||||
|
headers: { 'Authorization': 'Bearer '+goCqHttpBotToken },
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.json();
|
.json();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user