From d22869941ec704edd17d1d05038e6139681f97cf Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 28 Jul 2020 20:16:58 -0700 Subject: use async handler to catch async errors --- routes/lightning/send.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'routes/lightning/send.js') diff --git a/routes/lightning/send.js b/routes/lightning/send.js index be68143e..ad1bea62 100644 --- a/routes/lightning/send.js +++ b/routes/lightning/send.js @@ -1,4 +1,4 @@ -module.exports = async (req, res) => { +module.exports = ah(async (req, res) => { let { amount, route, memo, payreq } = req.body; let { user } = req; @@ -9,4 +9,4 @@ module.exports = async (req, res) => { res.status(500).send(e.message); throw new Error(e.message); } -}; +}); -- cgit v1.2.3