diff --git a/lib/get/get-full-source-space.js b/lib/get/get-full-source-space.js index c6be2d80..5cfb9f26 100644 --- a/lib/get/get-full-source-space.js +++ b/lib/get/get-full-source-space.js @@ -23,7 +23,8 @@ export default function getFullSourceSpace ({ includeDrafts, maxAllowedLimit, listrOptions, - query + queryEntries, + queryAssets }) { pageLimit = maxAllowedLimit || MAX_ALLOWED_LIMIT listrOptions = listrOptions || { @@ -73,7 +74,7 @@ export default function getFullSourceSpace ({ title: 'Fetching content entries data', task: (ctx, task) => { const teardownTaskListeners = logToTaskOutput(task) - return pagedGet({space: ctx.space, method: 'getEntries', query}) + return pagedGet({space: ctx.space, method: 'getEntries', query: queryEntries}) .then(extractItems) .then(sortEntries) .then((items) => filterDrafts(items, includeDrafts)) @@ -87,11 +88,8 @@ export default function getFullSourceSpace ({ { title: 'Fetching assets data', task: (ctx, task) => { - const assetsQuery = Object.assign({}, query) - // no content_type query for the assets endpoint - delete assetsQuery.content_type const teardownTaskListeners = logToTaskOutput(task) - return pagedGet({space: ctx.space, method: 'getAssets', assetsQuery}) + return pagedGet({space: ctx.space, method: 'getAssets', query: queryAssets}) .then(extractItems) .then((items) => { ctx.data.assets = items