mirror of
https://github.com/ArthurDanjou/artapi.git
synced 2026-01-14 20:29: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:
@@ -4,11 +4,7 @@ export default defineMcpResource({
|
||||
uri: 'resource://artmcp/projects',
|
||||
cache: '1 hour',
|
||||
handler: async (uri: URL) => {
|
||||
const event = useEvent()
|
||||
|
||||
const result = await queryCollection(event, 'projects')
|
||||
.where('extension', '=', 'md')
|
||||
.all()
|
||||
const result = await $fetch('/api/projects')
|
||||
|
||||
return {
|
||||
contents: [{
|
||||
|
||||
Reference in New Issue
Block a user