mirror of
https://github.com/ArthurDanjou/artmcp.git
synced 2026-01-14 19:09:25 +01:00
Add API endpoints for content and update MCP resources to use them
Co-authored-by: ArthurDanjou <29738535+ArthurDanjou@users.noreply.github.com>
This commit is contained in:
15
server/api/education.get.ts
Normal file
15
server/api/education.get.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export default defineEventHandler(async (event) => {
|
||||
const result = await queryCollection(event, 'education')
|
||||
.where('extension', '=', 'md')
|
||||
.all()
|
||||
|
||||
return result
|
||||
.sort((a, b) => new Date(b.startDate).getTime() - new Date(a.startDate).getTime())
|
||||
.map(edu => ({
|
||||
degree: edu.degree,
|
||||
institution: edu.institution,
|
||||
startDate: edu.startDate,
|
||||
endDate: edu.endDate,
|
||||
location: edu.location
|
||||
}))
|
||||
})
|
||||
Reference in New Issue
Block a user