From 9967f84059dfd1413764a4f8b74e53c74e5a5666 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Wed, 13 Sep 2023 23:46:31 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Refactor=20social=20fe?= =?UTF-8?q?ed=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Item.vue} | 0 .../Placeholder.vue} | 0 src/components/SocialFeed/index.vue | 140 ++++++++++++++++++ src/pages/feed/index.vue | 106 ++++--------- 4 files changed, 169 insertions(+), 77 deletions(-) rename src/components/{SocialFeedItem.vue => SocialFeed/Item.vue} (100%) rename src/components/{SocialFeedPlaceholder.vue => SocialFeed/Placeholder.vue} (100%) create mode 100644 src/components/SocialFeed/index.vue diff --git a/src/components/SocialFeedItem.vue b/src/components/SocialFeed/Item.vue similarity index 100% rename from src/components/SocialFeedItem.vue rename to src/components/SocialFeed/Item.vue diff --git a/src/components/SocialFeedPlaceholder.vue b/src/components/SocialFeed/Placeholder.vue similarity index 100% rename from src/components/SocialFeedPlaceholder.vue rename to src/components/SocialFeed/Placeholder.vue diff --git a/src/components/SocialFeed/index.vue b/src/components/SocialFeed/index.vue new file mode 100644 index 000000000..f5798d3c2 --- /dev/null +++ b/src/components/SocialFeed/index.vue @@ -0,0 +1,140 @@ + + + diff --git a/src/pages/feed/index.vue b/src/pages/feed/index.vue index 2372a552c..d9b57aac5 100644 --- a/src/pages/feed/index.vue +++ b/src/pages/feed/index.vue @@ -79,78 +79,25 @@ ]" > {{ /* Main View -- Town */ }} -
- - - - - - - {{ $t('feed_empty_action') }} - - +
+
{{ /* Main View -- collectibles */ }} @@ -328,7 +275,6 @@ export default { ...mapGetters([ 'getFolloweeEvents', 'getHasFetchMemo', - 'getFeedEventMemo', 'getAvailableFeedTxList', ]), wallet() { @@ -375,16 +321,22 @@ export default { return this.$route.query.view; }, shouldShowLoading() { - return this.walletFollowees.length && !this.displayedEvents.length; + return Boolean( + this.walletFollowees.length && !this.displayedEvents.length + ); }, shouldShowMore() { - return !!this.pendingMemoFetchList.length; + return Boolean(this.pendingMemoFetchList.length); }, shouldShowEnd() { - return this.displayedEvents.length && !this.pendingMemoFetchList.length; + return Boolean( + this.displayedEvents.length && !this.pendingMemoFetchList.length + ); }, shouldShowEmpty() { - return !this.pendingMemoFetchList.length && !this.displayedEvents.length; + return Boolean( + !this.pendingMemoFetchList.length && !this.displayedEvents.length + ); }, }, From e0708542fda5e322b60b38e2b73b808e211a5d75 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Thu, 14 Sep 2023 23:55:29 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E2=9C=A8=20Add=20suggestedFollowList=20to?= =?UTF-8?q?=20store?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constant/index.js | 12 +++++++ src/server/api/routes/users/v2/follow.js | 2 +- src/store/modules/wallet.js | 46 ++++++++++++++++++++++++ src/store/mutation-types.js | 2 ++ src/util/api/index.js | 9 ++++- 5 files changed, 69 insertions(+), 2 deletions(-) diff --git a/src/constant/index.js b/src/constant/index.js index 75137a31e..42a166b0c 100644 --- a/src/constant/index.js +++ b/src/constant/index.js @@ -216,3 +216,15 @@ export const NFT_BOOK_PLATFORM_LIKER_LAND = 'liker_land'; export const NFT_LEGACY_DEFAULT_MESSSAGE = 'like.co NFT API'; export const NFT_BATCH_COLLECT_MESSSAGE = '(multiple purchases)'; + +export const DEFAULT_SUGGESTED_FOLLOW_LIST = IS_TESTNET + ? [ + 'like13v8qtt0jz6y2304559v7l29sy7prz50jqwdewn', + 'like1qv66yzpgg9f8w46zj7gkuk9wd2nrpqmca3huxf', + 'like1vvxaklu364sejxe9tdwkg87aanejf8v6gj37y3', + ] + : [ + 'like19fqws220rwcmacn5dgt0dtwts8c05ty58mcr3a', // dungkaicheung + 'like13f4glvg80zvfrrs7utft5p68pct4mcq7t5atf6', // ckxpress + 'like1qfltekkttr8ul49x50dr5f2dq8qjgt58k99v6s', // Chow Sung Ming + ]; diff --git a/src/server/api/routes/users/v2/follow.js b/src/server/api/routes/users/v2/follow.js index 68d6bb2a8..e740cd296 100644 --- a/src/server/api/routes/users/v2/follow.js +++ b/src/server/api/routes/users/v2/follow.js @@ -14,7 +14,7 @@ const router = Router(); router.get('/followees', authenticateV2Login, async (req, res, next) => { try { - const { user } = req.session; + const user = req.query?.user || req.session.user; const userDoc = await walletUserCollection.doc(user).get(); if (!userDoc.exists) { res.json({ followees: [] }); diff --git a/src/store/modules/wallet.js b/src/store/modules/wallet.js index 21939a4ad..c38b8974d 100644 --- a/src/store/modules/wallet.js +++ b/src/store/modules/wallet.js @@ -4,6 +4,7 @@ import BigNumber from 'bignumber.js'; import { LIKECOIN_CHAIN_MIN_DENOM, LIKECOIN_NFT_API_WALLET, + DEFAULT_SUGGESTED_FOLLOW_LIST, } from '@/constant/index'; import { LIKECOIN_WALLET_CONNECTOR_CONFIG } from '@/constant/network'; import { catchAxiosError } from '~/util/misc'; @@ -62,6 +63,7 @@ import { WALLET_SET_ROYALTY_DETAILS, WALLET_SET_TOTAL_RESALES, WALLET_SET_RESALE_DETAILS, + WALLET_SET_SUGGESTED_FOLLOW_LIST, } from '../mutation-types'; const WALLET_EVENT_LIMIT = 100; @@ -84,6 +86,7 @@ const state = () => ({ events: [], followeeEventsMap: {}, feedEventMemoByTxMap: {}, + suggestedFollowList: [], isInited: null, methodType: null, likeBalance: null, @@ -219,6 +222,9 @@ const mutations = { [WALLET_SET_FEED_EVENT_MEMO](state, { key, event }) { Vue.set(state.feedEventMemoByTxMap, key, event); }, + [WALLET_SET_SUGGESTED_FOLLOW_LIST](state, list) { + state.suggestedFollowList = list; + }, }; const getters = { @@ -269,6 +275,8 @@ const getters = { Object.keys(state.feedEventMemoByTxMap).filter( key => state.feedEventMemoByTxMap[key]?.memo ), + getSuggestedFollowList: state => + state.suggestedFollowList || DEFAULT_SUGGESTED_FOLLOW_LIST, walletTotalSales: state => state.totalSales, walletTotalRoyalty: state => state.totalRoyalty, walletTotalResales: state => state.totalResales, @@ -672,6 +680,43 @@ const actions = { return memo; }, + async fetchSuggestedFollowList({ state, commit }) { + const currentFollowees = state.followees; + const currentFolloweesSet = new Set(currentFollowees); + + // Cache check and return cached result if it's valid + if ( + state.suggestedFollowList.length && + !currentFollowees.some(user => state.suggestedFollowList.includes(user)) + ) { + return state.suggestedFollowList; + } + + let suggestedList = [...DEFAULT_SUGGESTED_FOLLOW_LIST].filter( + suggestion => !currentFolloweesSet.has(suggestion) + ); + let currentIndex = 0; + + // If we don't have enough suggestions, fetch more + while (suggestedList.length < 3 && currentIndex < currentFollowees.length) { + // eslint-disable-next-line no-await-in-loop + const { followees = [], pastFollowees = [] } = await this.$axios.$get( + getUserV2Followees(currentFollowees[currentIndex]) + ); + + const followSuggestions = [...followees, ...pastFollowees].filter( + f => !currentFolloweesSet.has(f) + ); + suggestedList = [...suggestedList, ...followSuggestions]; + + currentIndex += 1; + } + + const result = suggestedList.slice(0, 3); + commit('WALLET_SET_SUGGESTED_FOLLOW_LIST', result); + return result; + }, + async fetchWalletEvents( { state, commit, dispatch }, { shouldFetchDetails = true } @@ -914,6 +959,7 @@ const actions = { commit(WALLET_SET_SALES_DETAILS, []); commit(WALLET_SET_FOLLOWEE_EVENTS, []); commit(WALLET_SET_FEED_EVENT_MEMO, {}); + commit(WALLET_SET_SUGGESTED_FOLLOW_LIST, []); await this.$api.post(postUserV2Logout()); }, async walletUpdateEmail( diff --git a/src/store/mutation-types.js b/src/store/mutation-types.js index feb756456..c18b17068 100644 --- a/src/store/mutation-types.js +++ b/src/store/mutation-types.js @@ -75,6 +75,8 @@ export const WALLET_SET_FOLLOWEE_EVENT_FETCHING = export const WALLET_SET_FOLLOWERS_FETCHING_STATE = 'WALLET_SET_FOLLOWERS_FETCHING_STATE'; export const WALLET_SET_EVENT_FETCHING = 'WALLET_SET_EVENT_FETCHING'; +export const WALLET_SET_SUGGESTED_FOLLOW_LIST = + 'WALLET_SET_SUGGESTED_FOLLOW_LIST'; export const WALLET_SET_NOTIFICATION_SETTINGS = 'WALLET_SET_NOTIFICATION_SETTINGS'; export const WALLET_SET_TOTAL_SALES = 'WALLET_SET_TOTAL_SALES'; diff --git a/src/util/api/index.js b/src/util/api/index.js index ab886fd6a..e6a3c1c92 100644 --- a/src/util/api/index.js +++ b/src/util/api/index.js @@ -366,7 +366,14 @@ export const getUserV2DisplayState = wallet => export const postUserV2DisplayState = wallet => `/api/v2/users/${wallet}/nfts/display-state`; export const getUserV2LocaleURL = () => `/api/v2/users/locale`; -export const getUserV2Followees = () => `/api/v2/users/followees`; +export const getUserV2Followees = user => { + if (user) { + const qsPayload = { user }; + return `/api/v2/users/followees?${querystring.stringify(qsPayload)}`; + } + return `/api/v2/users/followees`; +}; + export const getUserV2Followers = () => `/api/v2/users/followers`; export const postUserV2Followees = creator => { const qsPayload = { creator }; From ed26a69ea0900e65c4ea2b24bd882b10c34f9024 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Fri, 15 Sep 2023 00:12:09 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=92=84=20Add=20suggestedFollow=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SocialFeed/index.vue | 116 ++++++++++++++++++++++++---- src/locales/en.json | 2 + src/locales/zh-Hant.json | 2 + src/pages/feed/index.vue | 26 ++++--- 4 files changed, 123 insertions(+), 23 deletions(-) diff --git a/src/components/SocialFeed/index.vue b/src/components/SocialFeed/index.vue index f5798d3c2..7b7e6833d 100644 --- a/src/components/SocialFeed/index.vue +++ b/src/components/SocialFeed/index.vue @@ -1,12 +1,12 @@ From 3df69d904f2a6c405f3e4cec395af9776bdeed9b Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Fri, 15 Sep 2023 00:19:09 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=90=9B=20Ensure=20`list`=20is=20an=20?= =?UTF-8?q?array=20before=20spreading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/nft.js | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/store/modules/nft.js b/src/store/modules/nft.js index 3473427a7..b6ec39a16 100644 --- a/src/store/modules/nft.js +++ b/src/store/modules/nft.js @@ -239,13 +239,15 @@ const getters = { state.metadataByNFTClassAndNFTIdMap[`${classId}-${nftId}`], getNFTBookStorePricesByClassId: state => classId => state.nftBookStorePricesByClassIdMap[classId], - filterNFTClassListWithState: state => (nfts, wallet) => - nfts.filter( + filterNFTClassListWithState: state => (nfts, wallet) => { + if (!nfts.length) return []; + return nfts.filter( ({ classId }) => !state.userNFTClassDisplayStateSetsMap[wallet]?.hiddenClassIdSet?.has( classId ) - ), + ); + }, getNFTClassIdListSorterForCreated: (_, getters) => ({ list, collectorWallet: collector, @@ -253,9 +255,12 @@ const getters = { order = NFT_CLASS_LIST_SORTING_ORDER.DESC, shouldApplyDisplayState, }) => { - const filtered = shouldApplyDisplayState - ? getters.filterNFTClassListWithState(list, collector) - : [...list]; + let filtered = []; + if (shouldApplyDisplayState) { + filtered = getters.filterNFTClassListWithState(list, collector); + } else if (Array.isArray(list)) { + filtered = [...list]; + } const sorted = filtered.sort((nA, nB) => { const [{ classId: a }, { classId: b }] = [nA, nB]; if ( @@ -303,9 +308,12 @@ const getters = { order = NFT_CLASS_LIST_SORTING_ORDER.DESC, shouldApplyDisplayState, }) => { - const filtered = shouldApplyDisplayState - ? getters.filterNFTClassListWithState(list, collector) - : [...list]; + let filtered = []; + if (shouldApplyDisplayState) { + filtered = getters.filterNFTClassListWithState(list, collector); + } else if (Array.isArray(list)) { + filtered = [...list]; + } const sorted = filtered.sort((nA, nB) => { const [{ classId: a }, { classId: b }] = [nA, nB]; if ( From 66d7c5e76a2194d996ab11715691247f31eeb9db Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Fri, 15 Sep 2023 00:25:08 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=90=9B=20Avoid=20recommending=20dupli?= =?UTF-8?q?cate=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/wallet.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/store/modules/wallet.js b/src/store/modules/wallet.js index c38b8974d..d2991490d 100644 --- a/src/store/modules/wallet.js +++ b/src/store/modules/wallet.js @@ -692,13 +692,15 @@ const actions = { return state.suggestedFollowList; } - let suggestedList = [...DEFAULT_SUGGESTED_FOLLOW_LIST].filter( + const initialSuggestions = [...DEFAULT_SUGGESTED_FOLLOW_LIST].filter( suggestion => !currentFolloweesSet.has(suggestion) ); + + const suggestedSet = new Set(initialSuggestions); let currentIndex = 0; // If we don't have enough suggestions, fetch more - while (suggestedList.length < 3 && currentIndex < currentFollowees.length) { + while (suggestedSet.size < 3 && currentIndex < currentFollowees.length) { // eslint-disable-next-line no-await-in-loop const { followees = [], pastFollowees = [] } = await this.$axios.$get( getUserV2Followees(currentFollowees[currentIndex]) @@ -707,12 +709,13 @@ const actions = { const followSuggestions = [...followees, ...pastFollowees].filter( f => !currentFolloweesSet.has(f) ); - suggestedList = [...suggestedList, ...followSuggestions]; + + followSuggestions.forEach(suggestion => suggestedSet.add(suggestion)); currentIndex += 1; } - const result = suggestedList.slice(0, 3); + const result = [...suggestedSet].slice(0, 3); commit('WALLET_SET_SUGGESTED_FOLLOW_LIST', result); return result; }, From 167940cf23081a76862632e44c1b2614a4523c96 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Fri, 22 Sep 2023 16:39:22 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=8E=A8=20Handle=20fetch=20suggested?= =?UTF-8?q?=20follow=20list=20in=20server=20side?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/feed/index.vue | 3 +- src/server/api/routes/users/v2/follow.js | 68 +++++++++++++++--------- src/server/api/util/api.js | 34 +++++++++++- src/store/modules/wallet.js | 29 ++++------ src/util/api/index.js | 11 ++-- 5 files changed, 90 insertions(+), 55 deletions(-) diff --git a/src/pages/feed/index.vue b/src/pages/feed/index.vue index 07e92e3f0..7d1f4d013 100644 --- a/src/pages/feed/index.vue +++ b/src/pages/feed/index.vue @@ -351,7 +351,6 @@ export default { this.loadNFTClassesForCurrentTabByAddress(address); this.fetchNFTDisplayStateListByAddress(address); this.updateTopRankedCreators(); - this.fetchSuggestedFollowList(); this.hasStartedFetchingFirstBatch = false; this.hasStartedFetchingFolloweeEvents = false; } @@ -362,6 +361,7 @@ export default { handler(walletFollowees) { if (walletFollowees.length && !this.hasStartedFetchingFolloweeEvents) { this.fetchFolloweeWalletEvent(); + this.fetchSuggestedFollowList(); this.hasStartedFetchingFolloweeEvents = true; } }, @@ -381,7 +381,6 @@ export default { if (this.getAddress) { this.fetchNFTDisplayStateListByAddress(this.getAddress); this.updateTopRankedCreators(); - this.fetchSuggestedFollowList(); } }, methods: { diff --git a/src/server/api/routes/users/v2/follow.js b/src/server/api/routes/users/v2/follow.js index e740cd296..6bab630bc 100644 --- a/src/server/api/routes/users/v2/follow.js +++ b/src/server/api/routes/users/v2/follow.js @@ -9,41 +9,61 @@ const { nftMintSubscriptionCollection, } = require('../../../../modules/firebase'); const { publisher, PUBSUB_TOPIC_MISC } = require('../../../../modules/pubsub'); +const { getUserFollowees } = require('../../../util/api'); const router = Router(); router.get('/followees', authenticateV2Login, async (req, res, next) => { try { - const user = req.query?.user || req.session.user; - const userDoc = await walletUserCollection.doc(user).get(); - if (!userDoc.exists) { - res.json({ followees: [] }); - return; - } - const { - followees: walletFollowees = [], - email, - pastFollowees = [], - } = userDoc.data(); - let legacyFollowees = []; - if (email) { - const snapshot = await nftMintSubscriptionCollection - .where('subscriberEmail', '==', email) - .get(); - legacyFollowees = snapshot.docs.map(doc => { - const { subscribedWallet } = doc.data(); - return subscribedWallet; - }); - } - const followees = [ - ...new Set([...walletFollowees, ...legacyFollowees]).values(), - ]; + const { user } = req.session; + const { followees, pastFollowees } = await getUserFollowees(user); res.json({ followees, pastFollowees }); } catch (err) { handleRestfulError(req, res, next, err); } }); +router.get( + '/suggested-followees', + authenticateV2Login, + async (req, res, next) => { + try { + const { user } = req.session; + const { initialList = [] } = req.body; + const { followees = [], pastFollowees = [] } = await getUserFollowees( + user + ); + + const currentFollowees = [...followees, ...pastFollowees]; + const currentFolloweesSet = new Set(currentFollowees); + + const suggestedSet = new Set(initialList); + let currentIndex = 0; + + // If we don't have enough suggestions, fetch more + while (suggestedSet.size < 3 && currentIndex < currentFollowees.length) { + // eslint-disable-next-line no-await-in-loop + const { followees = [], pastFollowees = [] } = await getUserFollowees( + currentFollowees[currentIndex] + ); + + const followSuggestions = [...followees, ...pastFollowees].filter( + f => !currentFolloweesSet.has(f) + ); + + followSuggestions.forEach(suggestion => suggestedSet.add(suggestion)); + currentIndex += 1; + } + + const result = [...suggestedSet].slice(0, 3); + + res.json({ result }); + } catch (err) { + handleRestfulError(req, res, next, err); + } + } +); + router.post('/followees', authenticateV2Login, async (req, res, next) => { try { const { user } = req.session; diff --git a/src/server/api/util/api.js b/src/server/api/util/api.js index 5f374545d..b96e36e27 100644 --- a/src/server/api/util/api.js +++ b/src/server/api/util/api.js @@ -7,7 +7,11 @@ const { LIKE_CO_CLIENT_ID, LIKE_CO_CLIENT_SECRET, } = require('../../config/config'); -const { userCollection } = require('../../modules/firebase'); +const { + userCollection, + walletUserCollection, + nftMintSubscriptionCollection, +} = require('../../modules/firebase'); const { OAUTH_SCOPE_REQUEST } = require('../constant'); const LIKECOIN_API_BASE = IS_TESTNET @@ -174,6 +178,33 @@ const getOAuthCallbackAPI = authCode => { )}`; }; +async function getUserFollowees(user) { + const userDoc = await walletUserCollection.doc(user).get(); + if (!userDoc.exists) { + return []; + } + const { + followees: walletFollowees = [], + email, + pastFollowees = [], + } = userDoc.data(); + let legacyFollowees = []; + if (email) { + const snapshot = await nftMintSubscriptionCollection + .where('subscriberEmail', '==', email) + .get(); + legacyFollowees = snapshot.docs.map(doc => { + const { subscribedWallet } = doc.data(); + return subscribedWallet; + }); + } + const followees = [ + ...new Set([...walletFollowees, ...legacyFollowees]).values(), + ]; + + return { followees, pastFollowees }; +} + module.exports = { EXTERNAL_URL, apiRefreshAccessToken, @@ -190,4 +221,5 @@ module.exports = { apiCivicLikerGetStakingInfo, getOAuthURL, getOAuthCallbackAPI, + getUserFollowees, }; diff --git a/src/store/modules/wallet.js b/src/store/modules/wallet.js index d2991490d..3550211ad 100644 --- a/src/store/modules/wallet.js +++ b/src/store/modules/wallet.js @@ -16,6 +16,7 @@ import { postUserV2Login, postUserV2Logout, getUserV2Followees, + getUserV2SuggestedFollowees, postUserV2Followees, deleteUserV2Followees, getUserV2Followers, @@ -691,33 +692,21 @@ const actions = { ) { return state.suggestedFollowList; } - const initialSuggestions = [...DEFAULT_SUGGESTED_FOLLOW_LIST].filter( suggestion => !currentFolloweesSet.has(suggestion) ); const suggestedSet = new Set(initialSuggestions); - let currentIndex = 0; - - // If we don't have enough suggestions, fetch more - while (suggestedSet.size < 3 && currentIndex < currentFollowees.length) { - // eslint-disable-next-line no-await-in-loop - const { followees = [], pastFollowees = [] } = await this.$axios.$get( - getUserV2Followees(currentFollowees[currentIndex]) - ); - - const followSuggestions = [...followees, ...pastFollowees].filter( - f => !currentFolloweesSet.has(f) - ); - - followSuggestions.forEach(suggestion => suggestedSet.add(suggestion)); - - currentIndex += 1; + let resultList = []; + if (suggestedSet.size < 3) { + const { result } = await this.$api.$get(getUserV2SuggestedFollowees(), { + initialList: suggestedSet.value, + }); + resultList = result; } - const result = [...suggestedSet].slice(0, 3); - commit('WALLET_SET_SUGGESTED_FOLLOW_LIST', result); - return result; + commit('WALLET_SET_SUGGESTED_FOLLOW_LIST', resultList); + return resultList; }, async fetchWalletEvents( diff --git a/src/util/api/index.js b/src/util/api/index.js index e6a3c1c92..fe2eefa6b 100644 --- a/src/util/api/index.js +++ b/src/util/api/index.js @@ -366,14 +366,9 @@ export const getUserV2DisplayState = wallet => export const postUserV2DisplayState = wallet => `/api/v2/users/${wallet}/nfts/display-state`; export const getUserV2LocaleURL = () => `/api/v2/users/locale`; -export const getUserV2Followees = user => { - if (user) { - const qsPayload = { user }; - return `/api/v2/users/followees?${querystring.stringify(qsPayload)}`; - } - return `/api/v2/users/followees`; -}; - +export const getUserV2Followees = () => `/api/v2/users/followees`; +export const getUserV2SuggestedFollowees = () => + `/api/v2/users/suggested-followees`; export const getUserV2Followers = () => `/api/v2/users/followers`; export const postUserV2Followees = creator => { const qsPayload = { creator };