summaryrefslogtreecommitdiff
path: root/_www/trunks.ts
diff options
context:
space:
mode:
Diffstat (limited to '_www/trunks.ts')
-rw-r--r--_www/trunks.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/_www/trunks.ts b/_www/trunks.ts
index c35977c..9f470f0 100644
--- a/_www/trunks.ts
+++ b/_www/trunks.ts
@@ -324,7 +324,7 @@ export class Trunks {
body: JSON.stringify(attackReq),
});
const jsonRes = await httpRes.json();
- if (jsonRes.code != 200) {
+ if (jsonRes.code >= 400) {
wuiNotif.error(jsonRes.message);
return null;
}
@@ -346,7 +346,7 @@ export class Trunks {
method: "DELETE",
});
const jsonRes = await fres.json();
- if (jsonRes.code != 200) {
+ if (jsonRes.code >= 400) {
wuiNotif.error(jsonRes.message);
return null;
}
@@ -357,7 +357,7 @@ export class Trunks {
const url = API_ATTACK_RESULT + "?name=" + name;
const fres = await fetch(url);
const res = await fres.json();
- if (res.code != 200) {
+ if (res.code >= 400) {
wuiNotif.error(res.message);
}
return res;
@@ -413,14 +413,14 @@ export class Trunks {
});
const jsonRes = await httpRes.json();
- if (jsonRes.code != 200) {
+ if (jsonRes.code >= 400) {
wuiNotif.error(jsonRes.message);
return null;
}
const res = jsonRes.data as RunResponseInterface;
- if (res.ResponseStatusCode != 200) {
+ if (res.ResponseStatusCode >= 400) {
wuiNotif.error(`${httpTarget.Name}: ${res.ResponseStatus}`);
} else {
wuiNotif.info(`${httpTarget.Name}: ${res.ResponseStatus}`);
@@ -458,7 +458,7 @@ export class Trunks {
});
const jsonRes = await fres.json();
- if (jsonRes.code != 200) {
+ if (jsonRes.code >= 400) {
wuiNotif.error(jsonRes.message);
return null;
}