feat: add link generation support (short/sentence links) + wordlist
All checks were successful
Update changelog / changelog (push) Successful in 26s

This commit is contained in:
2026-01-02 17:50:52 +01:00
parent f0ca4e897c
commit f86630c51e
12 changed files with 7462 additions and 6 deletions

View File

@@ -8,11 +8,12 @@ const validate =
(schema: z.ZodObject) =>
(req: Request, res: Response, next: NextFunction) => {
try {
schema.parse({
let validatedData = schema.parse({
body: req.body,
query: req.query,
params: req.params,
});
res.locals.validated = validatedData;
next();
} catch (e: any) {
if (e instanceof z.ZodError) {
@@ -24,7 +25,7 @@ const validate =
return res.status(400)
.json(errorResponse);
} else {
console.log('Generic error triggered:', e);
console.log('Generic validation error triggered:', e);
let errorResponse: ErrorDTO = {
status: 'error',
error: 'Unknown error',