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/query.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'routes/lightning/query.js') diff --git a/routes/lightning/query.js b/routes/lightning/query.js index a374f3c5..dc867371 100644 --- a/routes/lightning/query.js +++ b/routes/lightning/query.js @@ -1,4 +1,4 @@ -module.exports = async (req, res) => { +module.exports = ah(async (req, res) => { const { payreq } = req.body; const invoice = await db.Invoice.findOne({ @@ -14,4 +14,4 @@ module.exports = async (req, res) => { if (invoice) emit(req.user.username, "to", invoice.user); res.end(); -}; +}); -- cgit v1.2.3