Skip to content

Commit

Permalink
docs: add explicit await to clarify sendRedirect is async (#23345)
Browse files Browse the repository at this point in the history
  • Loading branch information
hecktarzuli authored and manniL committed Dec 11, 2023
1 parent e6efabf commit 4a8c306
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/2.guide/2.directory-structure/1.server.md
Expand Up @@ -315,8 +315,8 @@ export default defineEventHandler((event) => {
### Sending Redirect

```ts [server/api/foo.get.ts]
export default defineEventHandler((event) => {
return sendRedirect(event, '/path/redirect/to', 302)
export default defineEventHandler(async (event) => {
await sendRedirect(event, '/path/redirect/to', 302)
})
```

Expand Down

0 comments on commit 4a8c306

Please sign in to comment.