diff options
| author | Adam Soltys <[email protected]> | 2022-12-28 18:43:04 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-12-28 18:43:04 +0000 |
| commit | df3f91fbc6d0b75c4c875c787d8ab29b2f1d2768 (patch) | |
| tree | 8d1e058404cdd1764a7c2f289fa8da9e2349f06f /routes/events.js | |
| parent | 204c47baa30e1ee4b1ff27b0abd58a7a5cf47db7 (diff) | |
| download | coinos-server-df3f91fbc6d0b75c4c875c787d8ab29b2f1d2768.tar.gz coinos-server-df3f91fbc6d0b75c4c875c787d8ab29b2f1d2768.zip | |
handle empty follows
Diffstat (limited to 'routes/events.js')
| -rw-r--r-- | routes/events.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routes/events.js b/routes/events.js index a773cb1c..63189f70 100644 --- a/routes/events.js +++ b/routes/events.js @@ -1,7 +1,7 @@ import app from "$app"; import db from "$db"; import redis from "$lib/redis"; -import { pool } from "$lib/nostr"; +import { coinos } from "$lib/nostr"; import store from "$lib/store"; import { wait } from "$lib/utils"; @@ -27,7 +27,7 @@ app.get("/nostr/:pubkey", async (req, res) => { let { since } = user; - pool.subscribe(pubkey, { + coinos.subscribe(pubkey, { since, kinds: [1], authors: [pubkey] @@ -52,6 +52,6 @@ app.get("/nostr/:pubkey", async (req, res) => { app.post("/nostr/send", async (req, res) => { let { event } = req.body; - pool.send(["EVENT", event]); + coinos.send(["EVENT", event]); res.send(event); }); |
