fix some anti pattern stuff

This commit is contained in:
Mystikfluu
2023-02-10 19:24:05 +01:00
parent 0a46eeee9f
commit 3254d01581
21 changed files with 130 additions and 151 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ export const setup = function (router, con, server) {
res.json({ "error": "no setting to change" });
return;
}
if ((typeof req.body.setting) != "string") {
if ((typeof req.body.setting) !== "string") {
res.status(411)
res.json({ "error": "no setting to change" });
return;
@@ -20,7 +20,7 @@ export const setup = function (router, con, server) {
let allowed = false;
let got = typeof req.body.value;
for (let index = 0; index < types.length; index++) {
if (types[index] == got) {
if (types[index] === got) {
allowed = true;
break;
}