Skip to content

Commit

Permalink
chore: apply automated updates
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] committed Apr 23, 2024
1 parent 53ee4fd commit 617c8cb
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions docs/2.utils/1.request.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,12 @@ export default defineEventHandler((event) => {
```ts
import { z } from "zod";
export default defineEventHandler((event) => {
const objectSchema = z.object({ key: z.string() });
const query = getValidatedQuery(event, objectSchema.safeParse);
const query = getValidatedQuery(
event,
z.object({
key: z.string(),
}),
);
});
```

Expand All @@ -230,8 +234,12 @@ export default defineEventHandler((event) => {
```ts
import { z } from "zod";
export default defineEventHandler((event) => {
const objectSchema = z.object({ key: z.string() });
const params = getValidatedRouterParams(event, objectSchema.safeParse);
const params = getValidatedRouterParams(
event,
z.object({
key: z.string(),
}),
);
});
```

Expand Down

0 comments on commit 617c8cb

Please sign in to comment.