Switch all routes to use Zod for strict validation

This commit is contained in:
Jesse Wierzbinski 2024-04-14 00:36:25 -10:00
parent 53fa9ca545
commit 0b1c1ba128
No known key found for this signature in database
67 changed files with 2459 additions and 2600 deletions

View file

@ -58,11 +58,11 @@ describe("RequestParser", () => {
headers: { "Content-Type": "application/json" },
body: "invalid json",
});
const result = await new RequestParser(request).toObject<{
const result = new RequestParser(request).toObject<{
param1: string;
param2: string;
}>();
expect(result).toEqual({});
expect(result).rejects.toThrow();
});
describe("should parse form data correctly", () => {