From ddfa28a9181c87da2f00720e73deace9259dbba4 Mon Sep 17 00:00:00 2001 From: supriyo-biswas Date: Thu, 22 Jun 2017 13:11:16 +0530 Subject: [PATCH] Remove absolute paths. (#165) --- static/files/js/downloads-controller.js | 2 +- static/files/js/utils.js | 6 +++--- static/files/template/download-tree.html | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/static/files/js/downloads-controller.js b/static/files/js/downloads-controller.js index 3ca1c84cd..1af2f58a1 100644 --- a/static/files/js/downloads-controller.js +++ b/static/files/js/downloads-controller.js @@ -98,7 +98,7 @@ app.controller("NodeController", function($scope, $rootScope, $http, $timeout) { }; $scope.remove = function() { - $http.delete("/download/" + n.$path); + $http.delete("download/" + n.$path); }; $scope.togglePreview = function() { diff --git a/static/files/js/utils.js b/static/files/js/utils.js index 695575833..fa65c22f1 100644 --- a/static/files/js/utils.js +++ b/static/files/js/utils.js @@ -3,7 +3,7 @@ app.factory('api', function($rootScope, $http, reqerr) { window.http = $http; var request = function(action, data) { - var url = "/api/"+action; + var url = "api/"+action; $rootScope.apiing = true; return $http.post(url, data).error(reqerr).finally(function() { $rootScope.apiing = false; @@ -23,7 +23,7 @@ app.factory('search', function($rootScope, $http, reqerr) { var params = {query:query}; if(page !== undefined) params.page = page; $rootScope.searching = true; - var req = $http.get("/search/"+provider, { params: params }); + var req = $http.get("search/"+provider, { params: params }); req.error(reqerr); req.finally(function() { $rootScope.searching = false; @@ -33,7 +33,7 @@ app.factory('search', function($rootScope, $http, reqerr) { one: function(provider, path) { var opts = { params: { item: path } }; $rootScope.searching = true; - var req = $http.get("/search/"+provider+"/item", opts); + var req = $http.get("search/"+provider+"/item", opts); req.error(reqerr); req.finally(function() { $rootScope.searching = false; diff --git a/static/files/template/download-tree.html b/static/files/template/download-tree.html index c219f61be..f72a6a354 100644 --- a/static/files/template/download-tree.html +++ b/static/files/template/download-tree.html @@ -8,7 +8,7 @@
{{ node.Name }} - {{ node.Name }} + {{ node.Name }} {{ node.Name }} @@ -20,11 +20,11 @@
{{ node.Size | bytes }} updated {{ ago(node.Modified) }}
- +