From 4b55acb796dfd8107e0f5e68515a3961a049e74c Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 26 Feb 2025 15:10:41 -0600 Subject: [PATCH] Clean up captchaController --- packages/ditto/controllers/api/captcha.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/ditto/controllers/api/captcha.ts b/packages/ditto/controllers/api/captcha.ts index 0f1f9ac4..d96e684a 100644 --- a/packages/ditto/controllers/api/captcha.ts +++ b/packages/ditto/controllers/api/captcha.ts @@ -10,6 +10,11 @@ interface Point { y: number; } +const pointSchema: z.ZodType = z.object({ + x: z.number(), + y: z.number(), +}); + const captchas = new TTLCache(); const imagesAsync = getCaptchaImages(); @@ -42,11 +47,6 @@ export const captchaController: AppController = async (c) => { }); }; -const pointSchema = z.object({ - x: z.number(), - y: z.number(), -}); - /** Verify the captcha solution and sign an event in the database. */ export const captchaVerifyController: AppController = async (c) => { const { user } = c.var;