From 9c23e09c712f476817887af7aa58d70b05056875 Mon Sep 17 00:00:00 2001 From: Jordan Brookman Date: Sat, 7 May 2022 17:35:10 -0400 Subject: [PATCH 1/2] Fix typo --- backend/sensei/nodes.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/sensei/nodes.js b/backend/sensei/nodes.js index 4414a9f..3642951 100644 --- a/backend/sensei/nodes.js +++ b/backend/sensei/nodes.js @@ -87,7 +87,7 @@ const payInvoice = async (invoice) => { return await res.json(); } -const keysend = async (destPubkey, amtMsat) => { +const keySend = async (destPubkey, amtMsat) => { const res = await fetch(`${BASE_URL}/v1/node/keysend`, { method: 'POST', @@ -102,3 +102,7 @@ const keysend = async (destPubkey, amtMsat) => { } ); } + +module.exports = { + getBalance +} \ No newline at end of file From e295aada2015b250764e2aa5e1db0e8d8a7f6d24 Mon Sep 17 00:00:00 2001 From: Jordan Brookman Date: Sat, 7 May 2022 17:42:52 -0400 Subject: [PATCH 2/2] Fix imports and exports --- backend/api/account/accountController.js | 2 +- backend/api/account/index.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/api/account/accountController.js b/backend/api/account/accountController.js index 0557955..433614b 100644 --- a/backend/api/account/accountController.js +++ b/backend/api/account/accountController.js @@ -46,4 +46,4 @@ const createInvoice = async (req, res) => { } }; -module.exports = { getAccountAllowance }; +module.exports = { getAccountAllowance, payInvoice, createInvoice }; diff --git a/backend/api/account/index.js b/backend/api/account/index.js index c5d57de..32a31c9 100644 --- a/backend/api/account/index.js +++ b/backend/api/account/index.js @@ -3,6 +3,9 @@ const router = express(); const { getAccountAllowance, payInvoice, createInvoice } = require('./accountController'); +const { getBalance } = require('../../sensei/nodes'); + +router.get('/account/balance', getBalance); router.get('/allowance', getAccountAllowance); router.get('/payment/send', payInvoice); router.get('/payment/receive', createInvoice);