From 16ad0324e7ebfa3cc069173fdcc4eb9bf55f1a1d Mon Sep 17 00:00:00 2001 From: Ean Milligan Date: Tue, 21 Apr 2026 15:42:36 -0400 Subject: [PATCH] fix maxlen for pin --- mod.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod.ts b/mod.ts index 1b2259f..5e8862a 100644 --- a/mod.ts +++ b/mod.ts @@ -99,7 +99,7 @@ Deno.serve({ port: config.api.port }, async (req) => { if (userNameMatches.length === 0) { if (body.name.length < 4 || body.name.length > 20) return genericResponse(STATUS_CODE.BadRequest, `Name too ${body.name.length < 4 ? 'short' : 'long'}.`); - if (body.pin.length < 4 || body.pin.length > 20) return genericResponse(STATUS_CODE.BadRequest, `PIN too ${body.pin.length < 4 ? 'short' : 'long'}.`); + if (body.pin.length < 4 || body.pin.length > 16) return genericResponse(STATUS_CODE.BadRequest, `PIN too ${body.pin.length < 4 ? 'short' : 'long'}.`); if (body.email.length > 255) return genericResponse(STATUS_CODE.BadRequest, 'Email too long.'); const id = nanoid();