Merge pull request #33113 from nextcloud/fix/stable24/ajax-file

[stable24] Remove .php from ajax url
This commit is contained in:
Carl Schwan 2022-07-05 17:51:40 +02:00 committed by GitHub
commit e00ef77def
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -99,7 +99,7 @@ $application->registerRoutes(
],
[
'name' => 'ajax#getStorageStats',
'url' => '/ajax/getstoragestats.php',
'url' => '/ajax/getstoragestats',
'verb' => 'GET',
],
[

View file

@ -25,7 +25,9 @@
state.call.abort();
}
state.dir = currentDir;
state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php') + '?dir=' + encodeURIComponent(currentDir),function(response) {
state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats?dir={dir}', {
dir: currentDir,
}), function(response) {
state.dir = null;
state.call = null;
Files.updateMaxUploadFilesize(response);
@ -37,7 +39,7 @@
},
_updateStorageQuotas: function() {
var state = Files.updateStorageQuotas;
state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) {
state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats'), function(response) {
Files.updateQuota(response);
});
},