diff options
Diffstat (limited to 'routes/lightning')
| -rw-r--r-- | routes/lightning/send.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/routes/lightning/send.js b/routes/lightning/send.js index ba88aaf6..b41d5ed0 100644 --- a/routes/lightning/send.js +++ b/routes/lightning/send.js @@ -1,20 +1,17 @@ import { err } from "$lib/logging"; import send from "$lib/send"; +import { requirePin } from "$lib/utils"; export default async (req, res) => { let { amount, route, memo, payreq } = req.body; let { user } = req; try { + await requirePin(req); res.send(await send(amount, memo, payreq, user)); } catch (e) { - console.log(e) - err( - "problem sending lightning payment", - user.username, - payreq, - e.message - ); + console.log(e); + err("problem sending lightning payment", user.username, payreq, e.message); res.code(500).send(e.message); } }; |
