feat: init

This commit is contained in:
2026-02-13 22:02:30 +01:00
commit 8f9ff830fb
16711 changed files with 3307340 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
export default defineEventHandler(async (event) => {
const code = getRouterParam(event, 'code') ?? ''
const rate = await getRateByCode(code)
if (!rate) {
throw createError({ statusCode: 404, statusMessage: 'Country not found', data: { error: 'Country not found' } })
}
setHeader(event, 'Cache-Control', 'public, max-age=3600')
return rate
})

View File

@@ -0,0 +1,5 @@
export default defineEventHandler(async (event) => {
const rates = await getAllRates()
setHeader(event, 'Cache-Control', 'public, max-age=3600')
return rates
})