aboutsummaryrefslogtreecommitdiffstats
path: root/routes/events.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-01-06 17:31:22 -0800
committerAdam Soltys <[email protected]>2023-01-06 17:31:22 -0800
commite3266ddecd825b8716df7dc418246441d4dcb0f7 (patch)
tree650dac95a42a09627f33fb3f3e76e6e0a0e23b9f /routes/events.js
parent6f7ad86583ee4e9e359829b55cb041d014902e07 (diff)
downloadcoinos-server-e3266ddecd825b8716df7dc418246441d4dcb0f7.tar.gz
coinos-server-e3266ddecd825b8716df7dc418246441d4dcb0f7.zip
background nostr fetching
Diffstat (limited to 'routes/events.js')
-rw-r--r--routes/events.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/routes/events.js b/routes/events.js
index 1734af24..bbdd8891 100644
--- a/routes/events.js
+++ b/routes/events.js
@@ -26,14 +26,15 @@ app.get("/nostr/:pubkey", async (req, res) => {
followers: []
};
- await q(pubkey, {
+ q(`${pubkey}:notes`, {
kinds: [1],
authors: [pubkey]
- });
+ }).catch(console.log);
await redis.set(`user:${pubkey}`, JSON.stringify(user));
let ids = await redis.sMembers(pubkey);
+ console.log("IDS", ids);
let events = ids.length
? (await redis.mGet(ids.map(k => "ev:" + k))).map(JSON.parse)