implement an entire base refacotr and alot of styling overhauls and remakes.

This commit is contained in:
2026-04-14 23:21:01 +02:00
parent 554ad494b0
commit feaa2e42c4
32 changed files with 6031 additions and 2638 deletions
+10
View File
@@ -0,0 +1,10 @@
export function validateBody(validator) {
return (req, res, next) => {
const result = validator(req.body || {}, req);
if (result?.error) {
return res.status(400).json({error: result.error});
}
req.validatedBody = result?.value ?? req.body ?? {};
return next();
};
}