From ea97fb5e831bade508ec2e61e8d9fdc1cf11878d Mon Sep 17 00:00:00 2001 From: Patrick Schnyder <69150941+pschnyder@users.noreply.github.com> Date: Mon, 9 Jan 2023 10:29:22 +0100 Subject: [PATCH] docs: fix deprecated function in routing example Changed deprecated ```useBody()``` to ```readBody()```. fixes: https://github.com/unjs/nitro/issues/789 --- docs/content/1.guide/1.introduction/3.routing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/1.guide/1.introduction/3.routing.md b/docs/content/1.guide/1.introduction/3.routing.md index 247a72c1fd..2faa5dc438 100644 --- a/docs/content/1.guide/1.introduction/3.routing.md +++ b/docs/content/1.guide/1.introduction/3.routing.md @@ -39,7 +39,7 @@ export default eventHandler(async event => { ```js // routes/user.post.ts export default eventHandler(async event => { - const body = await useBody(event) + const body = await readyBody(event) // TODO: Handle body and update user return `User updated!` })