Skip to content

Commit

Permalink
[Component Library] accept dataSourceId query param (#2024)
Browse files Browse the repository at this point in the history
  • Loading branch information
art-alexeyenko authored Jan 30, 2025
1 parent e080916 commit 5b2807c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Our versioning strategy is as follows:

### 🎉 New Features & Improvements

* `[nextjs][sitecore-jss-nextjs]` Support for Component Library feature in XMCloud ([#1987](https://github.com/Sitecore/jss/pull/1987)[#2000](https://github.com/Sitecore/jss/pull/2000)[#2002](https://github.com/Sitecore/jss/pull/2002)[#2005](https://github.com/Sitecore/jss/pull/2005))
* `[nextjs][sitecore-jss-nextjs]` Support for Component Library feature in XMCloud ([#1987](https://github.com/Sitecore/jss/pull/1987)[#2000](https://github.com/Sitecore/jss/pull/2000)[#2002](https://github.com/Sitecore/jss/pull/2002)[#2005](https://github.com/Sitecore/jss/pull/2005)[#2024](https://github.com/Sitecore/jss/pull/2024))

### 🐛 Bug Fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ describe('EditingRenderMiddleware', () => {
sc_version: 'latest',
secret: secret,
sc_renderingId: '123',
sc_datasourceId: '456',
dataSourceId: '456',
sc_uid: '789',
};

Expand All @@ -237,7 +237,7 @@ describe('EditingRenderMiddleware', () => {
site: query.sc_site,
pageState: 'normal',
mode: 'library',
dataSourceId: query.sc_datasourceId,
dataSourceId: query.dataSourceId,
version: query.sc_version,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ export class MetadataHandler {
site: query.sc_site,
pageState: LayoutServicePageState.Normal,
mode: 'library',
dataSourceId: query.sc_datasourceId,
dataSourceId: query.dataSourceId,
version: query.sc_version,
} as ComponentLibraryRenderPreviewData,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ export class RestComponentLayoutService extends RestLayoutService {
params.siteName = params.siteName || this.config.siteName;
const querystringParams = this.getComponentFetchParams(params);
debug.layout(
'fetching component with uid %s for %s %s %s',
'fetching component with uid %s for %s %s %s %s',
params.componentUid,
params.itemId,
params.language,
params.siteName
params.siteName,
params.dataSourceId
);
const fetcher = this.getFetcher(req, res);

Expand Down

0 comments on commit 5b2807c

Please sign in to comment.