Skip to content

Commit 9b90302

Browse files
committed
adding missing param for generate site pages
1 parent bf72f8a commit 9b90302

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/OnboardingSPA/steps/SiteGen/Editor/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ const StepSiteGenEditor = () => {
3737
const handleSitemapPagesGeneration = async () => {
3838
if ( false === currentData?.sitegen?.sitemapPagesGenerated ) {
3939
const sitemapPagesPublished = await publishSitemapPages(
40-
currentData.sitegen.siteDetails.prompt
40+
currentData.sitegen.siteDetails.prompt,
41+
currentData.sitegen.siteDetails.locale
4142
);
4243
if ( ! sitemapPagesPublished.error ) {
4344
currentData.sitegen.sitemapPagesGenerated = true;

src/OnboardingSPA/utils/api/siteGen.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,14 @@ export async function getCustomizeSidebarData() {
8282
);
8383
}
8484

85-
export async function publishSitemapPages( siteDescription ) {
85+
export async function publishSitemapPages( siteDescription, locale ) {
8686
return await resolve(
8787
apiFetch( {
8888
url: onboardingRestURL( 'sitegen/pages/sitemap' ),
8989
method: 'POST',
9090
data: {
9191
site_description: siteDescription,
92+
locale: locale
9293
},
9394
} ).then()
9495
);

0 commit comments

Comments
 (0)