From 33bfa7d2d4d74f4724d117ad58a825253e53d321 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 29 Dec 2022 10:32:48 -0800 Subject: move follower endpoints --- lib/utils.js | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'lib/utils.js') diff --git a/lib/utils.js b/lib/utils.js index 133be3c6..08a582eb 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -48,28 +48,6 @@ export const getUser = async (username, transaction) => { user.haspin = !!user.pin; - let { pubkey } = user; - - if (pubkey) { - store.fetching[pubkey] = true; - store.timeouts[pubkey] = setTimeout( - () => (store.fetching[pubkey] = false), - 500 - ); - - await wait(() => !!coinos, 100, 10); - coinos.subscribe(`${pubkey}:follows`, { - limit: 1, - kinds: [3], - authors: [pubkey] - }); - - await wait(() => !store.fetching[pubkey], 100, 10); - } - - user.follows = JSON.parse(await redis.get(`${pubkey}:follows`)) || []; - user.followers = await redis.sMembers(`${pubkey}:followers`); - return user; }; -- cgit v1.2.3