summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@proton.me>2025-03-23 14:16:35 -0400
committerGitHub <noreply@github.com>2025-03-23 14:16:35 -0400
commitc1906d69d5de839cc2f045fe7369c67a3719c06e (patch)
tree4a74581c8caf4ad5b8332a0d4c7716fb0f1c3113 /src/api
parentMerge pull request #1258 from thedudedies21/registration_tokens (diff)
parentUpdate index.ts (diff)
downloadserver-ts-c1906d69d5de839cc2f045fe7369c67a3719c06e.tar.xz
Merge pull request #1260 from MathMan05/patch-5
fix minor bug
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/users/@me/index.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/api/routes/users/@me/index.ts b/src/api/routes/users/@me/index.ts

index 9cd8bfda8..3e7b9caa1 100644 --- a/src/api/routes/users/@me/index.ts +++ b/src/api/routes/users/@me/index.ts
@@ -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",