mirror of
https://github.com/ArthurDanjou/artapi.git
synced 2026-01-14 21:19:25 +01:00
Add comprehensive profile enhancements: languages, certifications, profile info, and fix duplicate resource ID bug
Co-authored-by: ArthurDanjou <29738535+ArthurDanjou@users.noreply.github.com>
This commit is contained in:
10
server/api/certifications.get.ts
Normal file
10
server/api/certifications.get.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { queryCollection } from '@nuxt/content/server'
|
||||
|
||||
export default defineCachedEventHandler(async (event) => {
|
||||
return await queryCollection(event, 'certifications')
|
||||
.where('extension', '=', 'json')
|
||||
.first()
|
||||
}, {
|
||||
name: 'certifications-list',
|
||||
maxAge: 3600 // 1 hour
|
||||
})
|
||||
10
server/api/languages.get.ts
Normal file
10
server/api/languages.get.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { queryCollection } from '@nuxt/content/server'
|
||||
|
||||
export default defineCachedEventHandler(async (event) => {
|
||||
return await queryCollection(event, 'languages')
|
||||
.where('extension', '=', 'json')
|
||||
.first()
|
||||
}, {
|
||||
name: 'languages-list',
|
||||
maxAge: 3600 // 1 hour
|
||||
})
|
||||
10
server/api/profile.get.ts
Normal file
10
server/api/profile.get.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { queryCollection } from '@nuxt/content/server'
|
||||
|
||||
export default defineCachedEventHandler(async (event) => {
|
||||
return await queryCollection(event, 'profile')
|
||||
.where('extension', '=', 'json')
|
||||
.first()
|
||||
}, {
|
||||
name: 'profile-info',
|
||||
maxAge: 3600 // 1 hour
|
||||
})
|
||||
Reference in New Issue
Block a user