Skip to content

Commit

Permalink
docs: fix example in getting started (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-fricke committed Nov 3, 2023
1 parent 1bdc7f9 commit 29ecb9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/swift-buses-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"openapi-msw": patch
---

Fixed a small naming mistake in the "Getting Started" code example.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const getHandler = http.get("/resource/{id}", ({ params }) => {
});

// TS only suggests available POST paths
const getHandler = http.post("/resource", async ({ request }) => {
const postHandler = http.post("/resource", async ({ request }) => {
const data = await request.json();
return HttpResponse.json({ ...data /* ... more response data */ });
});
Expand Down

0 comments on commit 29ecb9c

Please sign in to comment.