fix min password length check

This commit is contained in:
Madeline 2023-08-12 00:20:36 +10:00
parent d06fbcebb8
commit c0614b18c3
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -225,9 +225,8 @@ router.post(
} }
if (body.password) { if (body.password) {
const min = register.password.minLength const min = register.password.minLength ?? 8;
? register.password.minLength
: 8;
if (body.password.length < min) { if (body.password.length < min) {
throw FieldErrors({ throw FieldErrors({
password: { password: {