From 5f961bada4e80e64117f76b19c097c490a7d170d Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 2 Mar 2021 16:24:15 +0100 Subject: [PATCH] Revert "encodeURI all REST api paths to preserve whitespaces" This reverts commit a63e0ed287ec3043302a9b8e617d2960e0c83dd6. --- src/js/client.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/client.js b/src/js/client.js index fafd4133a..ca0aee663 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -274,7 +274,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout config.headers = config.headers || {}; config.headers.Authorization = 'Bearer ' + token; - return $http.get(client.apiOrigin + encodeURI(url), config) + return $http.get(client.apiOrigin + url, config) .success(defaultSuccessHandler(callback)) .error(defaultErrorHandler(callback)); } @@ -289,7 +289,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout config.headers = config.headers || {}; config.headers.Authorization = 'Bearer ' + token; - return $http.head(client.apiOrigin + encodeURI(url), config) + return $http.head(client.apiOrigin + url, config) .success(defaultSuccessHandler(callback)) .error(defaultErrorHandler(callback)); } @@ -305,7 +305,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout config.headers = config.headers || {}; config.headers.Authorization = 'Bearer ' + token; - return $http.post(client.apiOrigin + encodeURI(url), data, config) + return $http.post(client.apiOrigin + url, data, config) .success(defaultSuccessHandler(callback)) .error(defaultErrorHandler(callback)); } @@ -321,7 +321,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout config.headers = config.headers || {}; config.headers.Authorization = 'Bearer ' + token; - return $http.put(client.apiOrigin + encodeURI(url), data, config) + return $http.put(client.apiOrigin + url, data, config) .success(defaultSuccessHandler(callback)) .error(defaultErrorHandler(callback)); } @@ -336,7 +336,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout config.headers = config.headers || {}; config.headers.Authorization = 'Bearer ' + token; - return $http.delete(client.apiOrigin + encodeURI(url), config) + return $http.delete(client.apiOrigin + url, config) .success(defaultSuccessHandler(callback)) .error(defaultErrorHandler(callback)); }