File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -639,15 +639,6 @@ const aggregate = async function (collectionId,
639639 const ids = extractIds ( queryParameters )
640640 const collections = extractCollectionIds ( queryParameters )
641641
642- let linkEndpoint = endpoint
643- let collectionEndpoint
644-
645- if ( collectionId ) {
646- queryParameters . collections = [ collectionId ]
647- linkEndpoint = `${ endpoint } /collections/${ collectionId } `
648- collectionEndpoint = `${ endpoint } /collections/${ collectionId } `
649- }
650-
651642 const searchParams = pickBy ( {
652643 datetime,
653644 intersects : geometry ,
@@ -656,6 +647,15 @@ const aggregate = async function (collectionId,
656647 collections,
657648 } )
658649
650+ let linkEndpoint = endpoint
651+ let collectionEndpoint
652+
653+ if ( collectionId ) {
654+ searchParams . collections = [ collectionId ]
655+ linkEndpoint = `${ endpoint } /collections/${ collectionId } `
656+ collectionEndpoint = `${ endpoint } /collections/${ collectionId } `
657+ }
658+
659659 logger . debug ( 'Aggregate parameters: %j' , searchParams )
660660
661661 let esResponse
You can’t perform that action at this time.
0 commit comments