aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routes/invoices.js2
-rw-r--r--routes/payments.js2
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`, {