1
0
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:
TomatoCake 2024-08-17 18:24:38 +02:00
parent 8e28f2539c
commit 95bbccb6f7
2 changed files with 4 additions and 4 deletions

View File

@ -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.`,
},
});
}

View File

@ -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.`,
},
});
}