aboutsummaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.js b/index.js
index c96abe5f..06338fbc 100644
--- a/index.js
+++ b/index.js
@@ -3,6 +3,7 @@ import persist from "./lib/persist";
import config from "./config/index";
import store from "./lib/store";
import { l, err } from "./lib/logging";
+import { optionalAuth } from "$lib/passport";
import "./db";
import "./lib/sockets";
@@ -28,7 +29,8 @@ if (config.lna) store.networks.push("lightning");
let host = process.env.HOST || "0.0.0.0";
let port = process.env.PORT || 3119;
-app.post('/echo', async (req, res) => {
+app.post('/echo', optionalAuth, async (req, res) => {
+ console.log(req.user.username)
console.log(req.body)
res.send(req.body);
});