Skip to content

Commit

Permalink
fix: typo in "Runtime + Type-Safe Request Utils" example (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuDerelle authored Jan 26, 2024
1 parent 7c9b16d commit 5487e4d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const userSchema = z.object({
})

export default defineEventHandler(async (event) => {
const result = await readValidatedBody(event, body => userSchema.safeParse(body).data) // or `.parse` to directly throw an error
const result = await readValidatedBody(event, body => userSchema.safeParse(body)) // or `.parse` to directly throw an error

if (!result.success)
throw result.error.issues
Expand Down

0 comments on commit 5487e4d

Please sign in to comment.