Skip to content

Commit

Permalink
Same error message if username too long
Browse files Browse the repository at this point in the history
  • Loading branch information
DEVTomatoCake committed Aug 17, 2024
1 parent 8e28f25 commit 95bbccb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/api/routes/auth/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ router.post(
if (body.username.length > maxUsername) {
throw FieldErrors({
username: {
code: "USERNAME_INVALID",
message: `Username must be less than ${maxUsername} in length`,
code: "BASE_TYPE_BAD_LENGTH",
message: `Must be between 2 and ${maxUsername} in length.`,
},
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/api/routes/users/@me/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ router.patch(
if (check_username.length > maxUsername) {
throw FieldErrors({
username: {
code: "USERNAME_INVALID",
message: `Username must be less than ${maxUsername} in length`,
code: "BASE_TYPE_BAD_LENGTH",
message: `Must be between 2 and ${maxUsername} in length.`,
},
});
}
Expand Down

0 comments on commit 95bbccb

Please sign in to comment.