aboutsummaryrefslogtreecommitdiffhomepage
path: root/public
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 /public
parenta6fa7ac141637a5026388157084c439f920c5ff1 (diff)
downloadPeerTube-f5a60a5138135a3412dfbcfd6e564f7aa47a55c2.tar.gz
PeerTube-f5a60a5138135a3412dfbcfd6e564f7aa47a55c2.tar.zst
PeerTube-f5a60a5138135a3412dfbcfd6e564f7aa47a55c2.zip
Add API versionning
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/index.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/public/javascripts/index.js b/public/javascripts/index.js
index 95caf7eb4..c67e22c7b 100644
--- a/public/javascripts/index.js
+++ b/public/javascripts/index.js
@@ -38,7 +38,7 @@
38 38
39 if (e.keyCode === 13) { 39 if (e.keyCode === 13) {
40 $.ajax({ 40 $.ajax({
41 url: '/api/videos/search/' + search, 41 url: '/api/v1/videos/search/' + search,
42 type: 'GET', 42 type: 'GET',
43 dataType: 'json', 43 dataType: 'json',
44 success: function (videos) { 44 success: function (videos) {
@@ -51,7 +51,7 @@
51 // Join a new network 51 // Join a new network
52 function makeFriends () { 52 function makeFriends () {
53 $.ajax({ 53 $.ajax({
54 url: '/api/pods/makefriends', 54 url: '/api/v1/pods/makefriends',
55 type: 'GET', 55 type: 'GET',
56 dataType: 'json', 56 dataType: 'json',
57 success: function () { 57 success: function () {
@@ -140,7 +140,7 @@
140 $form_video.fileupload({ 140 $form_video.fileupload({
141 singleFileUploads: true, 141 singleFileUploads: true,
142 multipart: true, 142 multipart: true,
143 url: '/api/videos', 143 url: '/api/v1/videos',
144 autoupload: false, 144 autoupload: false,
145 add: function (e, data) { 145 add: function (e, data) {
146 var $text = $('<span></span>').addClass('name_file').text(data['files'][0]['name']) 146 var $text = $('<span></span>').addClass('name_file').text(data['files'][0]['name'])
@@ -170,7 +170,7 @@
170 // Print the list of all the videos 170 // Print the list of all the videos
171 function getVideos () { 171 function getVideos () {
172 $.ajax({ 172 $.ajax({
173 url: '/api/videos/', 173 url: '/api/v1/videos/',
174 dataType: 'json', 174 dataType: 'json',
175 type: 'GET', 175 type: 'GET',
176 success: function (videos) { 176 success: function (videos) {
@@ -181,7 +181,7 @@
181 181
182 function removeVideo (video) { 182 function removeVideo (video) {
183 $.ajax({ 183 $.ajax({
184 url: '/api/videos/' + video._id, 184 url: '/api/v1/videos/' + video._id,
185 type: 'DELETE', 185 type: 'DELETE',
186 success: function (response, status) { 186 success: function (response, status) {
187 getVideos() 187 getVideos()