diff options
| author | Adam Soltys <[email protected]> | 2020-07-28 20:16:58 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-07-28 20:25:16 -0700 |
| commit | d22869941ec704edd17d1d05038e6139681f97cf (patch) | |
| tree | cfe600fead05c7e78dec6932c62d42171251eac8 /routes/lightning/query.js | |
| parent | 72f3bc93357e74b71be0e3f1e621fb556f7fd088 (diff) | |
| download | coinos-server-d22869941ec704edd17d1d05038e6139681f97cf.tar.gz coinos-server-d22869941ec704edd17d1d05038e6139681f97cf.zip | |
use async handler to catch async errors
Diffstat (limited to 'routes/lightning/query.js')
| -rw-r--r-- | routes/lightning/query.js | 4 |
1 files changed, 2 insertions, 2 deletions
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(); -}; +}); |
