diff --git a/controllers/api.js b/controllers/api.js index 189d70c..53e6f66 100644 --- a/controllers/api.js +++ b/controllers/api.js @@ -104,12 +104,13 @@ router.post('/addinvoice', async function(req, res) { }); router.post('/payinvoice', async function(req, res) { - logger.log('/payinvoice', [req.id]); let u = new User(redis, bitcoinclient, lightning); if (!(await u.loadByAuthorization(req.headers.authorization))) { return errorBadAuth(res); } + logger.log('/payinvoice', [req.id, 'userid: ' + u.getUserId()]); + if (!req.body.invoice) return errorBadArguments(res); let freeAmount = false; if (req.body.amount) {