Files
buildpath/frontend/server/api/cdragon/champion-summary.ts

14 lines
402 B
TypeScript

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