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;