diff options
| author | Adam Soltys <[email protected]> | 2022-12-29 10:32:48 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-12-29 10:32:48 -0800 |
| commit | 33bfa7d2d4d74f4724d117ad58a825253e53d321 (patch) | |
| tree | 625057f1943c4d52c30c65a209d5d47bd29059c3 /lib | |
| parent | 43d11679dda199924632e7c1825b6cdbc7fd5387 (diff) | |
| download | coinos-server-33bfa7d2d4d74f4724d117ad58a825253e53d321.tar.gz coinos-server-33bfa7d2d4d74f4724d117ad58a825253e53d321.zip | |
move follower endpoints
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/utils.js | 22 |
1 files changed, 0 insertions, 22 deletions
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; }; |
