diff options
author | ngn13 <78868991+ngn13@users.noreply.github.com> | 2023-06-10 22:13:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-10 22:13:44 +0300 |
commit | 9efe160340a90e5635ad018f22942c6ce3c08b62 (patch) | |
tree | c574bd7c118cabf493439a2f31b1642ade4e741c | |
parent | Implemented password length check (diff) | |
download | server-9efe160340a90e5635ad018f22942c6ce3c08b62.tar.xz |
making min password length configurable
Co-authored-by: Puyodead1 <puyodead@proton.me>
-rw-r--r-- | src/api/routes/auth/register.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts index 7b62f621..f8bc6da2 100644 --- a/src/api/routes/auth/register.ts +++ b/src/api/routes/auth/register.ts @@ -225,7 +225,7 @@ router.post( } if (body.password) { - if(body.password.length<8){ + if(body.password.length < register.password.minLength){ throw FieldErrors({ password: { code: "PASSWORD_REQUIREMENTS_MIN_LENGTH", |