Skip to content

Commit bf4f9bc

Browse files
chore: newer cda client uses a different way of requesting all locales []
1 parent dc76371 commit bf4f9bc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/tasks/get-space-data.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,11 @@ export default function getFullSourceSpace ({
8888
{
8989
title: 'Fetching content entries data',
9090
task: wrapTask((ctx) => {
91-
const source = cdaClient || ctx.environment
91+
const source = cdaClient?.withAllLocales || ctx.environment
9292
if (cdaClient) {
9393
// let's not fetch children when using Content Delivery API
9494
queryEntries = queryEntries || {}
9595
queryEntries.include = 0
96-
queryEntries.locale = '*'
9796
}
9897
return pagedGet({ source, method: 'getEntries', query: queryEntries })
9998
.then(extractItems)
@@ -109,9 +108,8 @@ export default function getFullSourceSpace ({
109108
{
110109
title: 'Fetching assets data',
111110
task: wrapTask((ctx) => {
112-
const source = cdaClient || ctx.environment
111+
const source = cdaClient?.withAllLocales || ctx.environment
113112
queryAssets = queryAssets || {}
114-
queryAssets.locale = '*'
115113
return pagedGet({ source, method: 'getAssets', query: queryAssets })
116114
.then(extractItems)
117115
.then((items) => filterDrafts(items, includeDrafts, cdaClient))

0 commit comments

Comments
 (0)