aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/friends.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-05-22 20:58:25 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-05-25 17:32:16 +0200
commite02643f32e4c97ca307f8fc5b69be79c40d70a3b (patch)
treeb7f6269913cd5a0e4f26a9461a043deb0c168be0 /server/lib/friends.ts
parent65fcc3119c334b75dd13bcfdebf186afdc580a8f (diff)
downloadPeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.gz
PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.zst
PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.zip
Type models
Diffstat (limited to 'server/lib/friends.ts')
-rw-r--r--server/lib/friends.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/friends.ts b/server/lib/friends.ts
index b32783019..08b776e83 100644
--- a/server/lib/friends.ts
+++ b/server/lib/friends.ts
@@ -1,7 +1,7 @@
1import { each, eachLimit, eachSeries, series, waterfall } from 'async' 1import { each, eachLimit, eachSeries, series, waterfall } from 'async'
2import request = require('request') 2import request = require('request')
3 3
4const db = require('../initializers/database') 4import { database as db } from '../initializers/database'
5import { 5import {
6 API_VERSION, 6 API_VERSION,
7 CONFIG, 7 CONFIG,
@@ -329,7 +329,7 @@ function makeRequestsToWinningPods (cert, podsList, callback) {
329 // Flush pool requests 329 // Flush pool requests
330 requestScheduler.forceSend() 330 requestScheduler.forceSend()
331 331
332 eachLimit(podsList, REQUESTS_IN_PARALLEL, function (pod: any, callbackEach) { 332 eachLimit(podsList, REQUESTS_IN_PARALLEL, function (pod: { host: string }, callbackEach) {
333 const params = { 333 const params = {
334 url: REMOTE_SCHEME.HTTP + '://' + pod.host + '/api/' + API_VERSION + '/pods/', 334 url: REMOTE_SCHEME.HTTP + '://' + pod.host + '/api/' + API_VERSION + '/pods/',
335 method: 'POST', 335 method: 'POST',
@@ -340,7 +340,7 @@ function makeRequestsToWinningPods (cert, podsList, callback) {
340 } 340 }
341 } 341 }
342 342
343 makeRetryRequest(params, function (err, res, body) { 343 makeRetryRequest(params, function (err, res, body: { cert: string, email: string }) {
344 if (err) { 344 if (err) {
345 logger.error('Error with adding %s pod.', pod.host, { error: err }) 345 logger.error('Error with adding %s pod.', pod.host, { error: err })
346 // Don't break the process 346 // Don't break the process