Skip to content

Commit

Permalink
fix typo in #224. why don't we lint the generated code????
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Dec 2, 2023
1 parent e9fd215 commit a11b939
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/msw-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ const handler =
let body = undefined;
if (bodySchema) {
const rawBody = await req.json();
const result = bodySchema.transform(snakeify).safeParse(body);
const result = bodySchema.transform(snakeify).safeParse(rawBody);
if (!result.success) return json(result.error.issues, { status: 400 });
body = result.data;
}
Expand Down
2 changes: 1 addition & 1 deletion generator/client/msw-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export function generateMSWHandlers(spec: OpenAPIV3.Document) {
let body = undefined
if (bodySchema) {
const rawBody = await req.json()
const result = bodySchema.transform(snakeify).safeParse(body);
const result = bodySchema.transform(snakeify).safeParse(rawBody);
if (!result.success) return json(result.error.issues, { status: 400 })
body = result.data
}
Expand Down

0 comments on commit a11b939

Please sign in to comment.