summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-03-22 11:53:23 +0100
committerGitHub <noreply@github.com>2018-03-22 11:53:23 +0100
commit91b9c0d2c4f825043b159103f9e1ddde89682ff0 (patch)
treeace3f8f0cb1145f17ccd78c96db2caafa8aa205c /apps
parentf843b7edfe7b3bc6e45d4610778d2df98b3985e3 (diff)
parentdabd7291c35599dd072cc82b93b3f1c2628835a7 (diff)
downloadnextcloud-server-91b9c0d2c4f825043b159103f9e1ddde89682ff0.tar.gz
nextcloud-server-91b9c0d2c4f825043b159103f9e1ddde89682ff0.zip
Merge pull request #8909 from nextcloud/feature/noid/make-the-autocomplete-endpoint-ocs
Make the new autocomplete endpoint OCS
Diffstat (limited to 'apps')
-rw-r--r--apps/comments/js/commentstabview.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js
index 9e501b141a7..20f1f590a28 100644
--- a/apps/comments/js/commentstabview.js
+++ b/apps/comments/js/commentstabview.js
@@ -240,19 +240,22 @@
if(!_.isUndefined(this._autoCompleteRequestCall)) {
this._autoCompleteRequestCall.abort();
}
- this._autoCompleteRequestCall = $.get(
- OC.generateUrl('/autocomplete/get'),
- {
+ this._autoCompleteRequestCall = $.ajax({
+ url: OC.linkToOCS('core', 2) + 'autocomplete/get',
+ data: {
search: query,
itemType: 'files',
itemId: s.model.get('id'),
sorter: 'commenters|share-recipients',
limit: OC.appConfig.comments.maxAutoCompleteResults
},
- function (data) {
- callback(data);
+ beforeSend: function (request) {
+ request.setRequestHeader('Accept', 'application/json');
+ },
+ success: function (result) {
+ callback(result.ocs.data);
}
- );
+ });
}, 400);
},