From f5a60a5138135a3412dfbcfd6e564f7aa47a55c2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 6 Nov 2015 17:34:15 +0100 Subject: Add API versionning --- src/pods.js | 4 ++-- src/videos.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/pods.js b/src/pods.js index 30d465ee5..db159a466 100644 --- a/src/pods.js +++ b/src/pods.js @@ -18,7 +18,7 @@ // ----------- Private functions ----------- function getForeignPodsList (url, callback) { - var path = '/api/pods' + var path = '/api/' + global.API_VERSION + '/pods' request.get(url + path, function (err, response, body) { if (err) throw err @@ -143,7 +143,7 @@ logger.debug('Make requests...') utils.makeMultipleRetryRequest( - { method: 'POST', path: '/api/pods/', data: data }, + { method: 'POST', path: '/api/' + global.API_VERSION + '/pods/', data: data }, pods_list, diff --git a/src/videos.js b/src/videos.js index 48ec19d4d..f787ae49c 100644 --- a/src/videos.js +++ b/src/videos.js @@ -73,7 +73,7 @@ logger.debug('Sending this video Uri to friends...') var data = { - path: '/api/remotevideos/add', + path: '/api/' + global.API_VERSION + '/remotevideos/add', method: 'POST', data: params } @@ -130,7 +130,7 @@ } var data = { - path: '/api/remotevideos/remove', + path: '/api/' + global.API_VERSION + '/remotevideos/remove', method: 'POST', data: { magnetUri: video.magnetUri -- cgit v1.2.3