aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/friends.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/friends.js')
-rw-r--r--server/lib/friends.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/server/lib/friends.js b/server/lib/friends.js
index 6a2c37fd7..667055d4c 100644
--- a/server/lib/friends.js
+++ b/server/lib/friends.js
@@ -1,6 +1,5 @@
1'use strict' 1'use strict'
2 2
3const config = require('config')
4const each = require('async/each') 3const each = require('async/each')
5const eachLimit = require('async/eachLimit') 4const eachLimit = require('async/eachLimit')
6const eachSeries = require('async/eachSeries') 5const eachSeries = require('async/eachSeries')
@@ -44,7 +43,7 @@ function getMyCertificate (callback) {
44 fs.readFile(constants.CONFIG.STORAGE.CERT_DIR + 'peertube.pub', 'utf8', callback) 43 fs.readFile(constants.CONFIG.STORAGE.CERT_DIR + 'peertube.pub', 'utf8', callback)
45} 44}
46 45
47function makeFriends (callback) { 46function makeFriends (urls, callback) {
48 const podsScore = {} 47 const podsScore = {}
49 48
50 logger.info('Make friends!') 49 logger.info('Make friends!')
@@ -54,8 +53,6 @@ function makeFriends (callback) {
54 return callback(err) 53 return callback(err)
55 } 54 }
56 55
57 const urls = config.get('network.friends')
58
59 eachSeries(urls, function (url, callbackEach) { 56 eachSeries(urls, function (url, callbackEach) {
60 computeForeignPodsList(url, podsScore, callbackEach) 57 computeForeignPodsList(url, podsScore, callbackEach)
61 }, function (err) { 58 }, function (err) {