diff options
-rw-r--r-- | server/lib/friends.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/friends.js b/server/lib/friends.js index f4f2ada87..e052574a5 100644 --- a/server/lib/friends.js +++ b/server/lib/friends.js | |||
@@ -156,10 +156,12 @@ function computeWinningPods (urls, podsScore) { | |||
156 | // Only add a pod if it exists in more than a half base pods | 156 | // Only add a pod if it exists in more than a half base pods |
157 | const podsList = [] | 157 | const podsList = [] |
158 | const baseScore = urls.length / 2 | 158 | const baseScore = urls.length / 2 |
159 | Object.keys(baseScore).forEach(function (pod) { | 159 | Object.keys(podsScore).forEach(function (pod) { |
160 | if (podsScore[pod] > baseScore) podsList.push({ url: pod }) | 160 | if (podsScore[pod] > baseScore) podsList.push({ url: pod }) |
161 | }) | 161 | }) |
162 | 162 | console.log(urls) | |
163 | console.log(podsScore) | ||
164 | console.log(podsList) | ||
163 | return podsList | 165 | return podsList |
164 | } | 166 | } |
165 | 167 | ||