diff options
| author | Adam Soltys <[email protected]> | 2022-12-28 10:48:45 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-12-28 10:48:45 -0800 |
| commit | 581a905b2fc14240d0bcbe6e2c14023fae3589a4 (patch) | |
| tree | e79a6743c0537fb606ea3502a6d883c46f7813be /lib/utils.js | |
| parent | ddb9a4350c56889f5c639d8a689d054fd6791af2 (diff) | |
| download | coinos-server-581a905b2fc14240d0bcbe6e2c14023fae3589a4.tar.gz coinos-server-581a905b2fc14240d0bcbe6e2c14023fae3589a4.zip | |
always define follows
Diffstat (limited to 'lib/utils.js')
| -rw-r--r-- | lib/utils.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/utils.js b/lib/utils.js index 6a4bc1b2..17283836 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -65,10 +65,11 @@ export const getUser = async (username, transaction) => { }); await wait(() => !store.fetching[pubkey], 100, 10); - user.follows = JSON.parse(await redis.get(`${pubkey}:follows`)) || []; - user.followers = await redis.sMembers(`${pubkey}:followers`); } + user.follows = JSON.parse(await redis.get(`${pubkey}:follows`)) || []; + user.followers = await redis.sMembers(`${pubkey}:followers`); + return user; }; @@ -203,4 +204,3 @@ export const derivePayRequest = async ({ amount, memo, tip }) => { await ln.invoice(value ? `${value}sat` : "any", new Date(), memo, 360) ).bolt11; }; - |
