aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/rates.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/routes/rates.ts b/routes/rates.ts
index f75afc57..e904d438 100644
--- a/routes/rates.ts
+++ b/routes/rates.ts
@@ -1,13 +1,14 @@
import { g } from "$lib/db";
+import { rate } from "$lib/rates";
export default {
async fx(_, res) {
let { fx } = await g("fx");
- res.send({fx});
+ res.send({ fx });
},
async last(_, res) {
- res.send(await g("rate"));
+ res.send(rate || (await g("rate")));
},
async index(_, res) {