mirror of
https://github.com/ArthurDanjou/artapi.git
synced 2026-01-14 20:59:26 +01:00
9 lines
229 B
TypeScript
9 lines
229 B
TypeScript
import { queryCollection } from '@nuxt/content/server'
|
|
|
|
export default defineCachedEventHandler(async (event) => {
|
|
return await queryCollection(event, 'hobbies').first()
|
|
}, {
|
|
name: 'hobbies-list',
|
|
maxAge: 3600 // 1 hour
|
|
})
|