Procházet zdrojové kódy

fix issue with wrong number of follows (#1153)

Bartosz Dryl před 3 roky
rodič
revize
f29a59fac9
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      src/api/client/resolvers.ts

+ 2 - 2
src/api/client/resolvers.ts

@@ -298,14 +298,14 @@ export const queryNodeStitchingResolvers = (
         info
       )
 
-      const followsLookup = createLookup<{ id: string; views: number }>(batchedChannelFollows || [])
+      const followsLookup = createLookup<{ id: string; follows: number }>(batchedChannelFollows || [])
       const viewsLookup = createLookup<{ id: string; views: number }>(batchedChannelViews || [])
 
       return parent.edges.map((edge: ChannelEdge) => ({
         ...edge,
         node: {
           ...edge.node,
-          follows: followsLookup[edge.node.id]?.views || 0,
+          follows: followsLookup[edge.node.id]?.follows || 0,
           views: viewsLookup[edge.node.id]?.views || 0,
         },
       }))