aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2015-11-06 17:34:15 +0100
committerChocobozzz <florian.bigard@gmail.com>2015-11-06 17:34:31 +0100
commitf5a60a5138135a3412dfbcfd6e564f7aa47a55c2 (patch)
tree2516f410a33792f9112b4b4253929e5292908a3f /src
parenta6fa7ac141637a5026388157084c439f920c5ff1 (diff)
downloadPeerTube-f5a60a5138135a3412dfbcfd6e564f7aa47a55c2.tar.gz
PeerTube-f5a60a5138135a3412dfbcfd6e564f7aa47a55c2.tar.zst
PeerTube-f5a60a5138135a3412dfbcfd6e564f7aa47a55c2.zip
Add API versionning
Diffstat (limited to 'src')
-rw-r--r--src/pods.js4
-rw-r--r--src/videos.js4
2 files changed, 4 insertions, 4 deletions
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 @@
18 // ----------- Private functions ----------- 18 // ----------- Private functions -----------
19 19
20 function getForeignPodsList (url, callback) { 20 function getForeignPodsList (url, callback) {
21 var path = '/api/pods' 21 var path = '/api/' + global.API_VERSION + '/pods'
22 22
23 request.get(url + path, function (err, response, body) { 23 request.get(url + path, function (err, response, body) {
24 if (err) throw err 24 if (err) throw err
@@ -143,7 +143,7 @@
143 logger.debug('Make requests...') 143 logger.debug('Make requests...')
144 144
145 utils.makeMultipleRetryRequest( 145 utils.makeMultipleRetryRequest(
146 { method: 'POST', path: '/api/pods/', data: data }, 146 { method: 'POST', path: '/api/' + global.API_VERSION + '/pods/', data: data },
147 147
148 pods_list, 148 pods_list,
149 149
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 @@
73 logger.debug('Sending this video Uri to friends...') 73 logger.debug('Sending this video Uri to friends...')
74 74
75 var data = { 75 var data = {
76 path: '/api/remotevideos/add', 76 path: '/api/' + global.API_VERSION + '/remotevideos/add',
77 method: 'POST', 77 method: 'POST',
78 data: params 78 data: params
79 } 79 }
@@ -130,7 +130,7 @@
130 } 130 }
131 131
132 var data = { 132 var data = {
133 path: '/api/remotevideos/remove', 133 path: '/api/' + global.API_VERSION + '/remotevideos/remove',
134 method: 'POST', 134 method: 'POST',
135 data: { 135 data: {
136 magnetUri: video.magnetUri 136 magnetUri: video.magnetUri