Files
buildpath/frontend/server/api/cdragon/items.ts
Valentin Haudiquet fe128c0848 Frontend updates: caching basic data (json) from CDragon
Implement caching in the patch_detector, consume the cache from API routes in frontend
2026-02-28 00:23:04 +01:00

15 lines
341 B
TypeScript

import { getItems } from '~/server/utils/cdragon-cache'
export default defineEventHandler(async () => {
try {
const items = await getItems()
return items
} catch (error) {
console.error('Error fetching items:', error)
throw createError({
statusCode: 500,
statusMessage: 'Failed to fetch items'
})
}
})