Skip to content

Commit

Permalink
test: cleanup --query param
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaledgarbaya committed Nov 30, 2017
1 parent 90830b4 commit c135af1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/get/get-full-source-space.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ 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', query})
return pagedGet({space: ctx.space, method: 'getAssets', assetsQuery})
.then(extractItems)
.then((items) => {
ctx.data.assets = items
Expand Down Expand Up @@ -172,10 +175,6 @@ function pagedGet ({space, method, skip = 0, aggregatedResponse = null, query =
query
)

if (method !== 'getEntries') {
delete query.content_type
}

return space[method](fullQuery)
.then((response) => {
if (!aggregatedResponse) {
Expand Down

0 comments on commit c135af1

Please sign in to comment.