Revert "format write"

This reverts commit 448f3290fc.
This commit is contained in:
Franjo Mindek
2025-09-18 11:42:31 +02:00
parent 19ba6d80f6
commit 054c1f8dc5
191 changed files with 3712 additions and 5219 deletions

View File

@@ -1,16 +1,14 @@
import { HttpError } from "wasp/server";
import * as z from "zod";
import { HttpError } from 'wasp/server';
import * as z from 'zod';
export function ensureArgsSchemaOrThrowHttpError<Schema extends z.ZodType>(
schema: Schema,
rawArgs: unknown,
rawArgs: unknown
): z.infer<Schema> {
const parseResult = schema.safeParse(rawArgs);
if (!parseResult.success) {
console.error(parseResult.error);
throw new HttpError(400, "Operation arguments validation failed", {
errors: parseResult.error.errors,
});
throw new HttpError(400, 'Operation arguments validation failed', { errors: parseResult.error.errors });
} else {
return parseResult.data;
}