aboutsummaryrefslogtreecommitdiffstats
path: root/core/src/services
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-08-25 17:01:10 +0200
committerJoas Schilling <coding@schilljs.com>2020-08-26 09:45:21 +0200
commit904badad56801f069c549f5e4507954b5978476d (patch)
tree556f257d3282637273c76f3c45085b43e934c110 /core/src/services
parent00459adfa29bba4198440d04ec6a505b65e5096a (diff)
downloadnextcloud-server-904badad56801f069c549f5e4507954b5978476d.tar.gz
nextcloud-server-904badad56801f069c549f5e4507954b5978476d.zip
Add the missing cursor parameter to unified search requests
Otherwise paginated search does not work. Basically you always requested the first x items and then showed them again and again. The second or any other subsequent page was never requested. On a side note this also caused lots of Vue warning due to duplicate keys. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/src/services')
-rw-r--r--core/src/services/UnifiedSearchService.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/src/services/UnifiedSearchService.js b/core/src/services/UnifiedSearchService.js
index 8e4c4a2a073..937fec66723 100644
--- a/core/src/services/UnifiedSearchService.js
+++ b/core/src/services/UnifiedSearchService.js
@@ -53,8 +53,13 @@ export async function getTypes() {
*
* @param {string} type the type to search
* @param {string} query the search
+ * @param {int|string|undefined} cursor the offset for paginated searches
* @returns {Promise}
*/
-export function search(type, query) {
- return axios.get(generateUrl(`/search/providers/${type}/search?term=${query}`))
+export function search(type, query, cursor) {
+ return axios.get(generateUrl(`/search/providers/${type}/search?term=${query}`), {
+ params: {
+ cursor,
+ }
+ })
}