mirror of
https://github.com/ArthurDanjou/artapi.git
synced 2026-01-14 21:19:25 +01:00
11 lines
236 B
TypeScript
11 lines
236 B
TypeScript
export default defineCachedEventHandler(async (event) => {
|
|
const result = await queryCollection(event, 'hobbies')
|
|
.where('extension', '=', 'md')
|
|
.first()
|
|
|
|
return result.body
|
|
}, {
|
|
maxAge: 60 * 60 * 24,
|
|
name: 'hobbies'
|
|
})
|