From 0fab410e8ba26ec2edf0810e129eeee0c6b42385 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 18 Jan 2025 21:26:41 -0800 Subject: prettier --- routes/nostr.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/routes/nostr.ts b/routes/nostr.ts index f1b6a585..0cf4a95e 100644 --- a/routes/nostr.ts +++ b/routes/nostr.ts @@ -266,19 +266,19 @@ 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]; - const content = JSON.stringify(await getProfile(pubkey)); - const callback = await getZapEndpoint({ content } as Event); - const url = new URL(callback); - url.searchParams.set("amount", (amount * 1000).toString()); - url.searchParams.set("nostr", JSON.stringify(event)); + const { event } = req.body; + const amount = event.tags.find((t) => t[0] === "amount")[1]; + const pubkey = event.tags.find((t) => t[0] === "p")[1]; + const content = JSON.stringify(await getProfile(pubkey)); + const callback = await getZapEndpoint({ content } as Event); + 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(); + const json = await got(url.toString()).json(); - res.send(json); - } catch(e) { + res.send(json); + } catch (e) { console.log(e); bail(res, e.message); } -- cgit v1.2.3