1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import { g } from "$lib/db"; import { rate } from "$lib/rates"; export default { async fx(_, res) { const { fx } = await g("fx"); res.send({ fx }); }, async last(_, res) { res.send(rate || (await g("rate"))); }, async index(_, res) { res.send(await g("rates")); }, };