mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 11:43:07 +01:00
Same error message if username too long
This commit is contained in:
parent
8e28f2539c
commit
95bbccb6f7
@ -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.`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -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.`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user