import type { H3Event } from 'h3'
export default cachedEventHandler((event) => {
const { user } = await requireUserSession(event) // from nuxt-auth-utils
// call to db with user.id
// ...
}, {
maxAge: 60 * 60, // 1 hour
})
import type { H3Event } from 'h3'
export default cachedEventHandler((event) => {
const { user } = await requireUserSession(event) // from nuxt-auth-utils
// call to db with user.id
// ...
}, {
maxAge: 60 * 60, // 1 hour
})