diff options
| author | Adam Soltys <[email protected]> | 2025-11-26 10:56:20 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-06 08:57:26 -0800 |
| commit | 2a408a3a7486464296e4e7f996fc2140a664d407 (patch) | |
| tree | d2855fef7c52bdb0758523dea50c2853d2d305f0 /routes/invoices.ts | |
| parent | 9089698e8df9d0c09c165c45eb6b05335a818699 (diff) | |
| download | coinos-server-2a408a3a7486464296e4e7f996fc2140a664d407.tar.gz coinos-server-2a408a3a7486464296e4e7f996fc2140a664d407.zip | |
ark
Diffstat (limited to 'routes/invoices.ts')
| -rw-r--r-- | routes/invoices.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/invoices.ts b/routes/invoices.ts index a18f4263..63338621 100644 --- a/routes/invoices.ts +++ b/routes/invoices.ts @@ -4,6 +4,7 @@ import { generate } from "$lib/invoices"; import { err } from "$lib/logging"; import { bail, fail, fields, getInvoice, getUser } from "$lib/utils"; import rpc from "@coinos/rpc"; +import { v4 } from "uuid"; export default { async get(req, res) { @@ -53,7 +54,7 @@ export default { try { const { id } = req.params; const { body } = req; - const { tip, webhook, secret } = body.invoice; + const { tip, webhook, secret, received } = body.invoice; if (tip < 0) fail("Invalid tip"); @@ -69,6 +70,7 @@ export default { } invoice = await generate({ invoice, user }); + await s(`invoice:${id}`, invoice); res.send(invoice); |
