aboutsummaryrefslogtreecommitdiffstats
path: root/index.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-17 00:20:22 -0800
committerAdam Soltys <[email protected]>2024-11-17 00:20:22 -0800
commit0acff5707d6838c14defef2bf0d08a7281a44a21 (patch)
tree9e16243af6c430e24afb930c3aaaef736b9bbc80 /index.ts
parent76c0a2a00eaa4f6b77cb34290e207c78fea971f8 (diff)
downloadcoinos-server-0acff5707d6838c14defef2bf0d08a7281a44a21.tar.gz
coinos-server-0acff5707d6838c14defef2bf0d08a7281a44a21.zip
handle blank offers
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/index.ts b/index.ts
index 03926604..8c4b7b11 100644
--- a/index.ts
+++ b/index.ts
@@ -1,12 +1,12 @@
import app from "$lib/app";
-import { auth, admin, optional } from "$lib/auth";
+import { admin, auth, optional } from "$lib/auth";
import { listenForLightning } from "$lib/lightning";
import { getLocations } from "$lib/locations";
+import nwc from "$lib/nwc";
import { catchUp, check } from "$lib/payments";
import { getFx } from "$lib/rates";
import { sendHeartbeat } from "$lib/sockets";
-import nwc from "$lib/nwc";
import ecash from "$routes/ecash";
import email from "$routes/email";
@@ -67,7 +67,7 @@ app.post("/send", auth, payments.internal);
app.post("/gateway", payments.gateway);
app.post("/replace", auth, payments.replace);
app.get("/decode/:bolt11", payments.decode);
-app.get("/offer/:offer", payments.offer);
+app.post("/fetchinvoice", payments.fetchinvoice);
app.get("/encode", lnurl.encode);
app.get("/decode", lnurl.decode);
@@ -134,12 +134,12 @@ app.post("/echo", (req, res) => {
res.send(req.body);
});
-let host: string = process.env["HOST"] || "0.0.0.0";
-let port: number = parseInt(process.env["PORT"]) || 3119;
+const host: string = process.env["HOST"] || "0.0.0.0";
+const port: number = parseInt(process.env["PORT"]) || 3119;
app.listen({ host, port });
-let logerr = (e: Error) =>
+const logerr = (e: Error) =>
// (e &&
// e.message &&
// (e.message.includes("Invalid") ||