aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/friends.ts
diff options
context:
space:
mode:
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 c0dd24c53..4cc4a82bf 100644
--- a/server/lib/friends.ts
+++ b/server/lib/friends.ts
@@ -334,9 +334,9 @@ function computeWinningPods (hosts: string[], podsScore: { [ host: string ]: num
334 334
335function getForeignPodsList (host: string) { 335function getForeignPodsList (host: string) {
336 return new Promise< ResultList<FormattedPod> >((res, rej) => { 336 return new Promise< ResultList<FormattedPod> >((res, rej) => {
337 const path = '/api/' + API_VERSION + '/pods' 337 const path = '/api/' + API_VERSION + '/remote/pods/list'
338 338
339 request.get(REMOTE_SCHEME.HTTP + '://' + host + path, (err, response, body) => { 339 request.post(REMOTE_SCHEME.HTTP + '://' + host + path, (err, response, body) => {
340 if (err) return rej(err) 340 if (err) return rej(err)
341 341
342 try { 342 try {
@@ -357,7 +357,7 @@ function makeRequestsToWinningPods (cert: string, podsList: PodInstance[]) {
357 357
358 return Promise.map(podsList, pod => { 358 return Promise.map(podsList, pod => {
359 const params = { 359 const params = {
360 url: REMOTE_SCHEME.HTTP + '://' + pod.host + '/api/' + API_VERSION + '/pods/', 360 url: REMOTE_SCHEME.HTTP + '://' + pod.host + '/api/' + API_VERSION + '/remote/pods/add',
361 method: 'POST' as 'POST', 361 method: 'POST' as 'POST',
362 json: { 362 json: {
363 host: CONFIG.WEBSERVER.HOST, 363 host: CONFIG.WEBSERVER.HOST,