From 2ba23e5d9d8ad8e024465fd398d428d080d15b61 Mon Sep 17 00:00:00 2001 From: bnonni Date: Sat, 7 May 2022 16:18:23 -0400 Subject: [PATCH] PUSH --- backend/api/account/accountService.js | 4 ++-- backend/app.js | 12 ++++++------ backend/sensei/admin.js | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/api/account/accountService.js b/backend/api/account/accountService.js index 1bb41d3..82fccac 100644 --- a/backend/api/account/accountService.js +++ b/backend/api/account/accountService.js @@ -1,7 +1,7 @@ const debug = require('../../utils/debug'); const senseiAdmin = require('../../sensei/admin'); -const getAccountBalance = async (username) => { +const getAccountAllowance = async (username) => { try { // get allowance from firestore return { success: true, message: charge }; @@ -11,4 +11,4 @@ const getAccountBalance = async (username) => { } }; -module.exports = { getAccountBalance }; +module.exports = { getAccountAllowance }; diff --git a/backend/app.js b/backend/app.js index eae0955..a291ca3 100644 --- a/backend/app.js +++ b/backend/app.js @@ -1,5 +1,5 @@ const dotenv = require('dotenv'); -dotenv.config({ path: `.env.${process.env.NODE_ENV}` }); +dotenv.config(); const PORT = process.env.PORT || 4000; const cors = require('cors'); @@ -20,12 +20,12 @@ app.use( ); app.get('/', async (req, res) => { - res.send(`Health check! Server running on port ${PORT}!`); + res.send(`Health check! Server srunning on port ${PORT}!`); }); -const spot = require('./api/spot'); -const invoice = require('./api/invoice'); -app.use('/api/v1/spot', spot); -app.use('/api/v1/invoice', invoice); +const account = require('./api/account'); +const admin = require('./api/admin'); +app.use('/api/v1/account', account); +app.use('/api/v1/admin', admin); module.exports = { app, PORT }; diff --git a/backend/sensei/admin.js b/backend/sensei/admin.js index dac0238..c68ebe0 100644 --- a/backend/sensei/admin.js +++ b/backend/sensei/admin.js @@ -142,7 +142,7 @@ const updateConfig = async (electrum_url) => { return await res.json(); }; -export { +module.exports = { initSensei, listNodes, createNode,