From 1e2564d3927ce4ca4ca9a09930da6da7ebb4e9a1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 20 Aug 2016 16:59:25 +0200 Subject: Server: make friends urls come from the request instead of the configuration file --- server/lib/friends.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'server/lib/friends.js') 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 @@ 'use strict' -const config = require('config') const each = require('async/each') const eachLimit = require('async/eachLimit') const eachSeries = require('async/eachSeries') @@ -44,7 +43,7 @@ function getMyCertificate (callback) { fs.readFile(constants.CONFIG.STORAGE.CERT_DIR + 'peertube.pub', 'utf8', callback) } -function makeFriends (callback) { +function makeFriends (urls, callback) { const podsScore = {} logger.info('Make friends!') @@ -54,8 +53,6 @@ function makeFriends (callback) { return callback(err) } - const urls = config.get('network.friends') - eachSeries(urls, function (url, callbackEach) { computeForeignPodsList(url, podsScore, callbackEach) }, function (err) { -- cgit v1.2.3