1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-25 11:43:07 +01:00

fix: check for password only if username is present in body

This commit is contained in:
Cyber 2024-07-25 19:41:56 +02:00 committed by Madeline
parent b682f170b9
commit f047f93b77

View File

@ -160,15 +160,15 @@ router.patch(
},
});
}
}
if (!body.password) {
throw FieldErrors({
password: {
message: req.t("auth:login.INVALID_PASSWORD"),
code: "INVALID_PASSWORD",
},
});
if (!body.password) {
throw FieldErrors({
password: {
message: req.t("auth:login.INVALID_PASSWORD"),
code: "INVALID_PASSWORD",
},
});
}
}
if (body.discriminator) {