diff options
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/ecash.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/routes/ecash.js b/routes/ecash.js index 1b8bcae1..8ce841dd 100644 --- a/routes/ecash.js +++ b/routes/ecash.js @@ -1,5 +1,5 @@ import { g, s, db } from "$lib/db"; -import { claim, mint } from "$lib/ecash"; +import { claim, mint, check } from "$lib/ecash"; import { bail } from "$lib/utils"; import { debit, credit, types } from "$lib/payments"; import { v4 } from "uuid"; @@ -12,7 +12,9 @@ let { ecash: type } = types; export default { async get({ params: { id } }, res) { try { - res.send(await g(`cash:${id}`)); + let token = await g(`cash:${id}`); + let status = await check(token); + res.send({ token, status }); } catch (e) { bail(res, e.message); } |
