fix: check for password only if username
is present in body
This commit is contained in:
parent
b682f170b9
commit
f047f93b77
@ -160,15 +160,15 @@ router.patch(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!body.password) {
|
if (!body.password) {
|
||||||
throw FieldErrors({
|
throw FieldErrors({
|
||||||
password: {
|
password: {
|
||||||
message: req.t("auth:login.INVALID_PASSWORD"),
|
message: req.t("auth:login.INVALID_PASSWORD"),
|
||||||
code: "INVALID_PASSWORD",
|
code: "INVALID_PASSWORD",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (body.discriminator) {
|
if (body.discriminator) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user