From 7ed5c119467b7a0f515ddb4e52ec98bc47b23f0e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 8 Feb 2023 10:53:07 -0800 Subject: classic invoices --- routes/invoices.js | 2 +- routes/payments.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/invoices.js b/routes/invoices.js index 6f79933f..dce3faf7 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -12,7 +12,7 @@ export default { invoice.user = await g(`user:${invoice.uid}`); } else { invoice = await got(`${config.classic}/invoice/${hash}`).json(); - fail("invoice not found"); + if (!invoice) fail("invoice not found"); invoice.id = invoice.uuid; invoice.classic = true; invoice.user.id = invoice.user.uuid; diff --git a/routes/payments.js b/routes/payments.js index 7fa6b308..b63ea716 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -27,7 +27,7 @@ export default { if (username && username.endsWith("@classic")) { let { username: source } = user; username = username.replace("@classic", ""); - p = await debit(hash, amount, 0, memo, user, types.classic); + p = await debit(hash, amount, 0, username, user, types.classic); await got .post(`${config.classic}/admin/credit`, { -- cgit v1.2.3