diff options
Diffstat (limited to 'routes/send.js')
| -rw-r--r-- | routes/send.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routes/send.js b/routes/send.js index f5087f37..e44d3224 100644 --- a/routes/send.js +++ b/routes/send.js @@ -66,7 +66,7 @@ module.exports = ah(async (req, res, next) => { }; if (!username) { - // throw new Error("Vouchers temporarily disabled"); + throw new Error("Vouchers temporarily disabled"); l.info("creating redeemable payment"); params.redeemcode = uuidv4(); params.hash = `${req.get("origin")}/redeem/${params.redeemcode}`; @@ -94,12 +94,12 @@ module.exports = ah(async (req, res, next) => { { transaction } ); - let text = address || payreq; params = { where: { user_id: recipient.id }, order: [["id", "DESC"]] }; - if (text) params.where.text = text; + if (address) params.where.address = address; + else if (payreq) params.where.text = payreq; let invoice = await db.Invoice.findOne(params); let a2; |
