aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-02-08 10:53:07 -0800
committerAdam Soltys <[email protected]>2023-02-08 10:53:07 -0800
commit7ed5c119467b7a0f515ddb4e52ec98bc47b23f0e (patch)
tree3466c2fb778d4ea2e19a8b62b0a2a65dda1b13de
parent204cf9ed18e4c643ebb4ec64439ac0c6afb1d1de (diff)
downloadcoinos-server-7ed5c119467b7a0f515ddb4e52ec98bc47b23f0e.tar.gz
coinos-server-7ed5c119467b7a0f515ddb4e52ec98bc47b23f0e.zip
classic invoices
-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`, {