Files
buildpath/frontend/server/api/routemap.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

17 lines
416 B
TypeScript

import { getChampionSummary } from '~/server/utils/cdragon-cache'
async function championRoutes() {
const championsData = await getChampionSummary()
const routes: Array<string> = []
for (const champion of championsData) {
routes.push('/champion/' + champion.alias.toLowerCase())
}
return routes
}
export default defineEventHandler(async _ => {
const data = await championRoutes()
return data
})