更新飞书 bot 验证过程,兼容新状态码

This commit is contained in:
Yu Zhao 2024-03-06 11:44:51 +08:00
parent cdeca4b808
commit 299c3d4263

View File

@ -525,7 +525,7 @@ export default class NotificationService {
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
}) })
.json(); .json();
if (res.StatusCode === 0) { if (res.StatusCode === 0 || res.code === 0) {
return true; return true;
} else { } else {
throw new Error(JSON.stringify(res)); throw new Error(JSON.stringify(res));