Commit 08012fc8 authored by Manuel BACLET's avatar Manuel BACLET

Return resource list and total number of items in search

parent 053ea48e
......@@ -786,10 +786,10 @@ export function search (baseId, searchQueryFilters, next) {
}
const url = getBaseUrl(baseId) + 'api/liste?' + queryString.stringify(queryStringParams)
callApiUrl(url, wantDataOptions, function (error, {liste}) {
callApiUrl(url, wantDataOptions, function (error, {liste, total}) {
if (error) return next(error)
if (!Array.isArray(liste)) return next(Error(`Réponse malformée (liste n’est pas un tableau mais ${liste})`))
next(null, liste)
next(null, {resources: liste, total})
})
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment