mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Clean up captchaController
This commit is contained in:
parent
a2aaa55b89
commit
4b55acb796
1 changed files with 5 additions and 5 deletions
|
|
@ -10,6 +10,11 @@ interface Point {
|
||||||
y: number;
|
y: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const pointSchema: z.ZodType<Point> = z.object({
|
||||||
|
x: z.number(),
|
||||||
|
y: z.number(),
|
||||||
|
});
|
||||||
|
|
||||||
const captchas = new TTLCache<string, Point>();
|
const captchas = new TTLCache<string, Point>();
|
||||||
const imagesAsync = getCaptchaImages();
|
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. */
|
/** Verify the captcha solution and sign an event in the database. */
|
||||||
export const captchaVerifyController: AppController = async (c) => {
|
export const captchaVerifyController: AppController = async (c) => {
|
||||||
const { user } = c.var;
|
const { user } = c.var;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue