import type { IRawCategoryCard } from '../../../types'; import { getUrlWithProxiedParams, convertCategoriesToChips } from '../../../runtime'; export default defineEventHandler(async (event) => { const apiUrl = process.env.NUXT_PUBLIC_API_DOMAIN; const url = getUrlWithProxiedParams(`${apiUrl}/v1/categories/top-random`, event); const categories = await cachedApiFetch>(url, event); return convertCategoriesToChips(categories, 'categories'); });