From e02643f32e4c97ca307f8fc5b69be79c40d70a3b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 22 May 2017 20:58:25 +0200 Subject: Type models --- server/lib/friends.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/lib/friends.ts') 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 @@ import { each, eachLimit, eachSeries, series, waterfall } from 'async' import request = require('request') -const db = require('../initializers/database') +import { database as db } from '../initializers/database' import { API_VERSION, CONFIG, @@ -329,7 +329,7 @@ function makeRequestsToWinningPods (cert, podsList, callback) { // Flush pool requests requestScheduler.forceSend() - eachLimit(podsList, REQUESTS_IN_PARALLEL, function (pod: any, callbackEach) { + eachLimit(podsList, REQUESTS_IN_PARALLEL, function (pod: { host: string }, callbackEach) { const params = { url: REMOTE_SCHEME.HTTP + '://' + pod.host + '/api/' + API_VERSION + '/pods/', method: 'POST', @@ -340,7 +340,7 @@ function makeRequestsToWinningPods (cert, podsList, callback) { } } - makeRetryRequest(params, function (err, res, body) { + makeRetryRequest(params, function (err, res, body: { cert: string, email: string }) { if (err) { logger.error('Error with adding %s pod.', pod.host, { error: err }) // Don't break the process -- cgit v1.2.3