Skip to content

Commit

Permalink
fix: check for password only if username is present in body
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberL1 authored and MaddyUnderStars committed Jul 28, 2024
1 parent b682f17 commit f047f93
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/api/routes/users/@me/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f047f93

Please sign in to comment.