refactor(core): Update invitation endpoints to use DTOs (#12377)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-12-26 18:24:14 +01:00
committed by GitHub
parent 371a09de96
commit 7b2630d1a0
14 changed files with 282 additions and 171 deletions

View File

@@ -93,7 +93,7 @@ export class ControllerRegistry {
if (arg.type === 'param') args.push(req.params[arg.key]);
else if (['body', 'query'].includes(arg.type)) {
const paramType = argTypes[index] as ZodClass;
if (paramType && 'parse' in paramType) {
if (paramType && 'safeParse' in paramType) {
const output = paramType.safeParse(req[arg.type]);
if (output.success) args.push(output.data);
else {