Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

docs: fix typo in defineEventHandler example #6741

Merged
merged 1 commit into from
Aug 18, 2022
Merged

Conversation

zhangzhibang0309
Copy link
Contributor

@zhangzhibang0309 zhangzhibang0309 commented Aug 18, 2022

export default anync( should delete ) defineEventHandler(async (event) => {
  const data = await useStorage().getItem('redis:test')
  return data
})

This function should not be called with async。

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

```
export default defineEventHandler(async (event) => {
  const data = await useStorage().getItem('redis:test')
  return data
})
```
This function should not be called with async。
@netlify
Copy link

netlify bot commented Aug 18, 2022

Deploy Preview for nuxt3-docs ready!

Name Link
🔨 Latest commit 23913f7
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62fe09b048ea5900084e3fe1
😎 Deploy Preview https://deploy-preview-6741--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@zhangzhibang0309 zhangzhibang0309 changed the title Update 9.server-routes.md Docs: Remove async from function calls Aug 18, 2022
@danielroe danielroe changed the title Docs: Remove async from function calls docs: fix typo in defineEventHandler example Aug 18, 2022
@danielroe danielroe added the documentation Improvements or additions to documentation label Aug 18, 2022
@pi0 pi0 merged commit 40f0c82 into nuxt:main Aug 18, 2022
@pi0
Copy link
Member

pi0 commented Aug 18, 2022

Thanks!

@pi0 pi0 mentioned this pull request Aug 26, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants