diff options
| -rwxr-xr-x | bun.lockb | bin | 209762 -> 209762 bytes | |||
| -rw-r--r-- | routes/nostr.ts | 6 |
2 files changed, 6 insertions, 0 deletions
| Binary files differ diff --git a/routes/nostr.ts b/routes/nostr.ts index 2b47b834..f1b6a585 100644 --- a/routes/nostr.ts +++ b/routes/nostr.ts @@ -265,6 +265,7 @@ export default { }, async zap(req, res) { + try { const { event } = req.body; const amount = event.tags.find((t) => t[0] === "amount")[1]; const pubkey = event.tags.find((t) => t[0] === "p")[1]; @@ -273,8 +274,13 @@ export default { const url = new URL(callback); url.searchParams.set("amount", (amount * 1000).toString()); url.searchParams.set("nostr", JSON.stringify(event)); + console.log("URL", url.toString()); const json = await got(url.toString()).json(); res.send(json); + } catch(e) { + console.log(e); + bail(res, e.message); + } }, }; |
