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/invoice.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/invoice.js')
| -rw-r--r-- | routes/lightning/invoice.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/lightning/invoice.js b/routes/lightning/invoice.js index 2f39bf3f..689c696a 100644 --- a/routes/lightning/invoice.js +++ b/routes/lightning/invoice.js @@ -1,4 +1,4 @@ -module.exports = async (req, res) => { +module.exports = ah(async (req, res) => { const { amount, memo, tip } = req.body; l.info("adding lightning invoice", req.user.username, amount, tip); @@ -15,4 +15,4 @@ module.exports = async (req, res) => { l.error("problem creating invoice", e.message); res.status(500).send(e.message); } -}; +}); |
