Signed-off-by: Joas Schilling <coding@schilljs.com>tags/v23.0.0beta1
@@ -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' | |||
}, |
@@ -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; |
@@ -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( |
@@ -276,7 +276,7 @@ OCA.Sharing.App = { | |||
type: OCA.Files.FileActions.TYPE_INLINE, | |||
actionHandler(fileName, context) { | |||
const shareId = context.$file.data('shareId') | |||
$.post(OC.linkToOCS('apps/files_sharing/api/v1/deletedshares/{shareId}', { shareId })) | |||
$.post(OC.linkToOCS('apps/files_sharing/api/v1/deletedshares', 2) + shareId) | |||
.success(function(result) { | |||
context.fileList.remove(context.fileInfoModel.attributes.name) | |||
}).fail(function() { | |||
@@ -302,7 +302,7 @@ OCA.Sharing.App = { | |||
if (context.$file.attr('data-remote-id')) { | |||
shareBase = 'remote_shares/pending' | |||
} | |||
$.post(OC.linkToOCS('apps/files_sharing/api/v1/' + shareBase + '/{shareId}', { shareId })) | |||
$.post(OC.linkToOCS('apps/files_sharing/api/v1/shares/pending', 2) + shareId) | |||
.success(function(result) { | |||
context.fileList.remove(context.fileInfoModel.attributes.name) | |||
}).fail(function() { | |||
@@ -333,7 +333,7 @@ OCA.Sharing.App = { | |||
} | |||
$.ajax({ | |||
url: OC.linkToOCS('apps/files_sharing/api/v1/' + shareBase + '/{shareId}', { shareId }), | |||
url: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + shareId, | |||
type: 'DELETE', | |||
}).success(function(result) { | |||
context.fileList.remove(context.fileInfoModel.attributes.name) |
@@ -196,7 +196,7 @@ | |||
var promises = [] | |||
var deletedShares = { | |||
url: OC.linkToOCS('apps/files_sharing/api/v1/deletedshares'), | |||
url: OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'deletedshares', | |||
/* jshint camelcase: false */ | |||
data: { | |||
format: 'json', | |||
@@ -209,7 +209,7 @@ | |||
} | |||
var pendingShares = { | |||
url: OC.linkToOCS('apps/files_sharing/api/v1/shares/pending'), | |||
url: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + 'pending', | |||
/* jshint camelcase: false */ | |||
data: { | |||
format: 'json' | |||
@@ -221,7 +221,7 @@ | |||
} | |||
var pendingRemoteShares = { | |||
url: OC.linkToOCS('apps/files_sharing/api/v1/remote_shares/pending'), | |||
url: OC.linkToOCS('apps/files_sharing/api/v1/remote_shares', 2) + 'pending', | |||
/* jshint camelcase: false */ | |||
data: { | |||
format: 'json' | |||
@@ -233,7 +233,7 @@ | |||
} | |||
var shares = { | |||
url: OC.linkToOCS('apps/files_sharing/api/v1/shares'), | |||
url: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares', | |||
/* jshint camelcase: false */ | |||
data: { | |||
format: 'json', | |||
@@ -247,7 +247,7 @@ | |||
} | |||
var remoteShares = { | |||
url: OC.linkToOCS('apps/files_sharing/api/v1/remote_shares'), | |||
url: OC.linkToOCS('apps/files_sharing/api/v1') + 'remote_shares', | |||
/* jshint camelcase: false */ | |||
data: { | |||
format: 'json', |
@@ -2,7 +2,7 @@ | |||
OC.Settings = OC.Settings || {}; | |||
OC.Settings.Apps = OC.Settings.Apps || { | |||
rebuildNavigation: function() { | |||
$.getJSON(OC.linkToOCS('core/navigation/apps?format=json')).done(function(response){ | |||
$.getJSON(OC.linkToOCS('core/navigation', 2) + 'apps?format=json').done(function(response){ | |||
if(response.ocs.meta.status === 'ok') { | |||
var addedApps = {}; | |||
var navEntries = response.ocs.data; |
@@ -35,7 +35,7 @@ OC.Settings = _.extend(OC.Settings, { | |||
if ($elements.length > 0) { | |||
// Let's load the data and THEN init our select | |||
$.ajax({ | |||
url: OC.linkToOCS('cloud/groups/details'), | |||
url: OC.linkToOCS('cloud/groups', 2) + 'details', | |||
dataType: 'json', | |||
success: function(data) { | |||
var results = []; |
@@ -222,7 +222,7 @@ window.addEventListener('DOMContentLoaded', function () { | |||
user = OC.getCurrentUser(); | |||
$.ajax({ | |||
url: OC.linkToOCS('cloud/users/{uid}', { uid: user.uid }), | |||
url: OC.linkToOCS('cloud/users', 2) + user['uid'], | |||
method: 'PUT', | |||
data: { | |||
key: 'language', | |||
@@ -248,7 +248,7 @@ window.addEventListener('DOMContentLoaded', function () { | |||
user = OC.getCurrentUser(); | |||
$.ajax({ | |||
url: OC.linkToOCS('cloud/users/{uid}', { uid: user.uid }), | |||
url: OC.linkToOCS('cloud/users', 2) + user.uid, | |||
method: 'PUT', | |||
data: { | |||
key: 'locale', |