summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-08-19 13:11:58 +0200
committerJoas Schilling <coding@schilljs.com>2021-08-31 12:57:59 +0200
commit243098a96f4a5eb4707bf434720c1d0e2b0e9a20 (patch)
tree23c5bb34c08556522c779c6a58e7cbf1cd2cf8fb /apps/files_external
parent40d4ff3704edae787dbe9150b9e41b6d191e9925 (diff)
downloadnextcloud-server-243098a96f4a5eb4707bf434720c1d0e2b0e9a20.tar.gz
nextcloud-server-243098a96f4a5eb4707bf434720c1d0e2b0e9a20.zip
Revert OC.linkToOCS() calls back to old behaviour
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/js/mountsfilelist.js2
-rw-r--r--apps/files_external/js/statusmanager.js6
-rw-r--r--apps/files_external/tests/js/mountsfilelistSpec.js2
3 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_external/js/mountsfilelist.js b/apps/files_external/js/mountsfilelist.js
index d3059309b95..b2e25e4ccd9 100644
--- a/apps/files_external/js/mountsfilelist.js
+++ b/apps/files_external/js/mountsfilelist.js
@@ -92,7 +92,7 @@
this._setCurrentDir('/', false);
this._reloadCall = $.ajax({
- url: OC.linkToOCS('apps/files_external/api/v1/mounts'),
+ url: OC.linkToOCS('apps/files_external/api/v1', 2) + 'mounts',
data: {
format: 'json'
},
diff --git a/apps/files_external/js/statusmanager.js b/apps/files_external/js/statusmanager.js
index 8985edd968a..d77f056cf1d 100644
--- a/apps/files_external/js/statusmanager.js
+++ b/apps/files_external/js/statusmanager.js
@@ -141,7 +141,7 @@ OCA.Files_External.StatusManager = {
self.isGetMountPointListRunning = true;
$.ajax({
type: 'GET',
- url: OC.linkToOCS('apps/files_external/api/v1/mounts?format=json'),
+ url: OC.linkToOCS('apps/files_external/api/v1') + 'mounts?format=json',
success: function (response) {
self.mountPointList = [];
_.each(response.ocs.data, function (mount) {
@@ -159,7 +159,7 @@ OCA.Files_External.StatusManager = {
},
error: function (jqxhr, state, error) {
self.mountPointList = [];
- OC.Notification.show(t('files_external', 'Couldn\'t get the list of external mount points: {type}',
+ OC.Notification.show(t('files_external', 'Couldn\'t get the list of external mount points: {type}',
{type: error}), {type: 'error'}
);
},
@@ -271,7 +271,7 @@ OCA.Files_External.StatusManager = {
// check if we have a list first
if (list === undefined && !self.emptyWarningShown) {
self.emptyWarningShown = true;
- OC.Notification.show(t('files_external', 'Couldn\'t fetch list of Windows network drive mount points: Empty response from server'),
+ OC.Notification.show(t('files_external', 'Couldn\'t fetch list of Windows network drive mount points: Empty response from server'),
{type: 'error'}
);
return;
diff --git a/apps/files_external/tests/js/mountsfilelistSpec.js b/apps/files_external/tests/js/mountsfilelistSpec.js
index 66357448147..6068326ee28 100644
--- a/apps/files_external/tests/js/mountsfilelistSpec.js
+++ b/apps/files_external/tests/js/mountsfilelistSpec.js
@@ -117,7 +117,7 @@ describe('OCA.Files_External.FileList tests', function() {
expect(fakeServer.requests.length).toEqual(1);
request = fakeServer.requests[0];
expect(request.url).toEqual(
- OC.linkToOCS('apps/files_external/api/v1/mounts?format=json')
+ OC.linkToOCS('apps/files_external/api/v1') + 'mounts?format=json'
);
fakeServer.requests[0].respond(