docs: pass event to useRuntimeConfig (#25788)

This commit is contained in:
Sam Blowes 2024-02-14 11:55:03 +00:00 committed by GitHub
parent 363bb57b63
commit a6b3c512a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -132,7 +132,7 @@ And then access the new CDN url using `config.app.cdnURL`.
```ts [server/api/foo.ts] ```ts [server/api/foo.ts]
export default defineEventHandler((event) => { export default defineEventHandler((event) => {
const config = useRuntimeConfig() const config = useRuntimeConfig(event)
// Access cdnURL universally // Access cdnURL universally
const cdnURL = config.app.cdnURL const cdnURL = config.app.cdnURL