Check for old password when setting new
Checks for password
This commit is contained in:
parent
33fde3bc4a
commit
76857bdcfb
@ -127,7 +127,7 @@ router.patch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (body.new_password) {
|
if (body.new_password) {
|
||||||
if (!body.password && !user.email) {
|
if (!body.password || !user.email) {
|
||||||
throw FieldErrors({
|
throw FieldErrors({
|
||||||
password: {
|
password: {
|
||||||
code: "BASE_TYPE_REQUIRED",
|
code: "BASE_TYPE_REQUIRED",
|
||||||
|
|||||||
Reference in New Issue
Block a user