Skip to content

Commit c1906d6

Browse files
authored
Merge pull request #1260 from MathMan05/patch-5
fix minor bug
2 parents ec1d727 + 9028774 commit c1906d6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/api/routes/users/@me/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ router.patch(
152152
}
153153

154154
const { maxUsername } = Config.get().limits.user;
155-
if (check_username.length > maxUsername) {
155+
if (
156+
check_username.length > maxUsername ||
157+
check_username.length < 2
158+
) {
156159
throw FieldErrors({
157160
username: {
158161
code: "BASE_TYPE_BAD_LENGTH",

0 commit comments

Comments
 (0)