diff options
| author | Adam Soltys <[email protected]> | 2024-11-17 00:20:22 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-17 00:20:22 -0800 |
| commit | 0acff5707d6838c14defef2bf0d08a7281a44a21 (patch) | |
| tree | 9e16243af6c430e24afb930c3aaaef736b9bbc80 /index.ts | |
| parent | 76c0a2a00eaa4f6b77cb34290e207c78fea971f8 (diff) | |
| download | coinos-server-0acff5707d6838c14defef2bf0d08a7281a44a21.tar.gz coinos-server-0acff5707d6838c14defef2bf0d08a7281a44a21.zip | |
handle blank offers
Diffstat (limited to 'index.ts')
| -rw-r--r-- | index.ts | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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") || |
