aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lightning/withdraw.js
blob: d1712d395d8abaec1204049f69239dd9c1a775db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
module.exports = ah(async (req, res) => {
    let { amount, memo, payreq } = req.body;
    let { user } = req;

    try {
        res.send(await send(amount, memo, payreq, user, true));
    } catch (e) {
        l.error("problem sending lightning withdrawal", user.username, e.message, e.stack);
        res.status(500).send(e.message);
    }
});