修复typescript类型错误

This commit is contained in:
whyour
2022-08-26 17:34:38 +08:00
parent d2590edab3
commit 529880642f
4 changed files with 5 additions and 11 deletions
+2 -2
View File
@@ -245,7 +245,7 @@ export default class NotificationService {
const [corpid, corpsecret, touser, agentid, thumb_media_id = '1'] =
weWorkAppKey.split(',');
const url = `https://qyapi.weixin.qq.com/cgi-bin/gettoken`;
const { access_token } = await got
const tokenRes: any = await got
.post(url, {
timeout: this.timeout,
retry: 0,
@@ -296,7 +296,7 @@ export default class NotificationService {
const res: any = await got
.post(
`https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${access_token}`,
`https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=${tokenRes.access_token}`,
{
timeout: this.timeout,
retry: 0,