Server function returns now (Wizard fix)

This commit is contained in:
emad-salah 2019-12-01 15:11:18 +01:00
parent 44e3d9311b
commit 2277165a80

View file

@ -71,6 +71,8 @@ const server = program => {
GET: { GET: {
"/healthz": true, "/healthz": true,
"/ping": true, "/ping": true,
// Errors out when viewing an API page from the browser
"/favicon.ico": true,
"/api/lnd/connect": true, "/api/lnd/connect": true,
"/api/lnd/wallet/status": true, "/api/lnd/wallet/status": true,
"/api/lnd/auth": true "/api/lnd/auth": true
@ -87,7 +89,7 @@ const server = program => {
const auth = require("../services/auth/auth"); const auth = require("../services/auth/auth");
app.use(async (req, res, next) => { app.use(async (req, res, next) => {
console.log("Route:", req.path)
if (unprotectedRoutes[req.method][req.path]) { if (unprotectedRoutes[req.method][req.path]) {
next(); next();
} else { } else {
@ -249,6 +251,7 @@ const server = program => {
}; };
startServer(); startServer();
return "Server started";
}; };
module.exports = server; module.exports = server;