mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Switch all routes to use Zod for strict validation
This commit is contained in:
parent
53fa9ca545
commit
0b1c1ba128
67 changed files with 2459 additions and 2600 deletions
|
|
@ -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", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue