From a4cd81a106bd0dc9f856ce025da606443a472a7a Mon Sep 17 00:00:00 2001 From: Agustin Kassis Date: Wed, 1 Apr 2020 20:51:14 -0300 Subject: [PATCH] Removed duplicated balance api --- controllers/api.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/controllers/api.js b/controllers/api.js index 9738f6b..90ddcff 100644 --- a/controllers/api.js +++ b/controllers/api.js @@ -270,20 +270,6 @@ router.get('/checkpayment/:payment_hash', async function(req, res) { res.send({paid: paid}); }); -router.get('/balance', postLimiter, async function(req, res) { - logger.log('/balance', [req.id]); - try { - let u = new User(redis, bitcoinclient, lightning); - await u.loadByAuthorization(req.headers.authorization); - - if (!u.getUserId()) { - return errorBadAuth(res); - } - - let paid = !!(await u.getPaymentHashPaid(req.params.payment_hash)); - res.send({ paid: paid }); -}); - router.get('/balance', postLimiter, async function(req, res) { try { logger.log('/balance', [req.id]);