mirror of
https://github.com/ArthurDanjou/artapi.git
synced 2026-01-14 21:09:25 +01:00
13 lines
289 B
TypeScript
13 lines
289 B
TypeScript
import { queryCollection } from '@nuxt/content/server'
|
|
|
|
export default defineCachedEventHandler(async (event) => {
|
|
return {
|
|
body: await queryCollection(event, 'projects')
|
|
.where('extension', '=', 'md')
|
|
.all()
|
|
}
|
|
}, {
|
|
name: 'projects-list',
|
|
maxAge: 3600 // 1 hour
|
|
})
|