From a1632ae402d11fdd7ffc360de97c55e0b4fad677 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 28 Feb 2026 14:14:30 -0800 Subject: migrate to hono --- routes/rates.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'routes/rates.ts') diff --git a/routes/rates.ts b/routes/rates.ts index e532ec78..d4426a6e 100644 --- a/routes/rates.ts +++ b/routes/rates.ts @@ -2,17 +2,17 @@ import { g } from "$lib/db"; import { rate } from "$lib/rates"; export default { - async fx(_, res) { + async fx(c) { const { fx } = await g("fx"); - res.send({ fx }); + return c.json({ fx }); }, - async last(_, res) { - res.send(rate || (await g("rate"))); + async last(c) { + return c.json(rate || (await g("rate"))); }, - async index(_, res) { + async index(c) { const { date, fx, ...rates } = await g("rates"); - res.send(rates); + return c.json(rates); }, }; -- cgit v1.2.3