summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-08-12 00:20:36 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-08-12 00:20:36 +1000
commitc0614b18c3696d956978de557a0ec36ab3e18dda (patch)
treee7d3bfe702afb285cf02d70c234fe027c6e8e292 /src/api
parentset rules/updates in guild if we created them (diff)
downloadserver-c0614b18c3696d956978de557a0ec36ab3e18dda.tar.xz
fix min password length check
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/auth/register.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts
index 14dc319a..c92ebfe0 100644
--- a/src/api/routes/auth/register.ts
+++ b/src/api/routes/auth/register.ts
@@ -225,9 +225,8 @@ router.post(
 		}
 
 		if (body.password) {
-			const min = register.password.minLength
-				? register.password.minLength
-				: 8;
+			const min = register.password.minLength ?? 8;
+
 			if (body.password.length < min) {
 				throw FieldErrors({
 					password: {