fix: fix typo

This commit is contained in:
Fu Diwei 2024-12-23 22:46:01 +08:00
parent 16bc12c15b
commit 7a66bdf139
3 changed files with 6 additions and 6 deletions

View File

@ -15,8 +15,8 @@ export const notifyTest = async (channel: string) => {
},
});
if (resp.status != 0 && resp.status !== 200) {
throw new ClientResponseError({ status: resp.status, response: resp, data: {} });
if (resp.code != 0) {
throw new ClientResponseError({ status: resp.code, response: resp, data: {} });
}
return resp;

View File

@ -10,8 +10,8 @@ export const get = async () => {
method: "GET",
});
if (resp.status != 0 && resp.status !== 200) {
throw new ClientResponseError({ status: resp.status, response: resp, data: {} });
if (resp.code != 0) {
throw new ClientResponseError({ status: resp.code, response: resp, data: {} });
}
return resp.data as Statistics;

View File

@ -15,8 +15,8 @@ export const run = async (id: string) => {
},
});
if (resp.status != 0 && resp.status !== 200) {
throw new ClientResponseError({ status: resp.status, response: resp, data: {} });
if (resp.code != 0) {
throw new ClientResponseError({ status: resp.code, response: resp, data: {} });
}
return resp;