]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - public/javascripts/index.js
Add API versionning
[github/Chocobozzz/PeerTube.git] / public / javascripts / index.js
index 95caf7eb4081ccfaf1e385bfad6ca03fdba9155d..c67e22c7bfe127c504e4d17e8d1242680b01d287 100644 (file)
@@ -38,7 +38,7 @@
 
     if (e.keyCode === 13) {
       $.ajax({
-        url: '/api/videos/search/' + search,
+        url: '/api/v1/videos/search/' + search,
         type: 'GET',
         dataType: 'json',
         success: function (videos) {
@@ -51,7 +51,7 @@
   // Join a new network
   function makeFriends () {
     $.ajax({
-      url: '/api/pods/makefriends',
+      url: '/api/v1/pods/makefriends',
       type: 'GET',
       dataType: 'json',
       success: function () {
     $form_video.fileupload({
       singleFileUploads: true,
       multipart: true,
-      url: '/api/videos',
+      url: '/api/v1/videos',
       autoupload: false,
       add: function (e, data) {
         var $text = $('<span></span>').addClass('name_file').text(data['files'][0]['name'])
   // Print the list of all the videos
   function getVideos () {
     $.ajax({
-      url: '/api/videos/',
+      url: '/api/v1/videos/',
       dataType: 'json',
       type: 'GET',
       success: function (videos) {
 
   function removeVideo (video) {
     $.ajax({
-      url: '/api/videos/' + video._id,
+      url: '/api/v1/videos/' + video._id,
       type: 'DELETE',
       success: function (response, status) {
         getVideos()