Merge pull request #1260 from MathMan05/patch-5

fix minor bug
This commit is contained in:
Puyodead1 2025-03-23 14:16:35 -04:00 committed by GitHub
commit c1906d69d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -152,7 +152,10 @@ router.patch(
}
const { maxUsername } = Config.get().limits.user;
if (check_username.length > maxUsername) {
if (
check_username.length > maxUsername ||
check_username.length < 2
) {
throw FieldErrors({
username: {
code: "BASE_TYPE_BAD_LENGTH",