aboutsummaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/index.js b/index.js
index 5593ddab..595eaaac 100644
--- a/index.js
+++ b/index.js
@@ -16,7 +16,7 @@ import io from 'socket.io'
import jwt from 'jsonwebtoken'
import morgan from 'morgan'
import reverse from 'buffer-reverse'
-import zmq from 'zmq'
+import zmq from 'zeromq'
import config from './config'
@@ -287,6 +287,14 @@ const l = console.log
// res.send('success')
})
+ app.get('/channels', auth, async (req, res) => {
+ return res.send(await lna.listChannels())
+ })
+
+ app.get('/peers', auth, async (req, res) => {
+ return res.send(await lna.listPeers())
+ })
+
app.post('/sendPayment', auth, async (req, res) => {
await req.user.reload()
let hash = req.body.payreq