Files
buildpath/frontend/server/api/cdragon/summoner-spells.ts

14 lines
396 B
TypeScript

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