fix(hosting): POC builder works with existing sites
The Build POC button on site detail now passes site_id to the POC builder, which populates the existing site's store with CMS content instead of trying to create a new site (which failed with duplicate slug error). - poc_builder_service.build_poc() accepts optional site_id param - If site_id given: uses existing site, skips hosted_site_service.create() - If not given: creates new site (standalone POC build) - API schema: added site_id to BuildPocRequest - Frontend: passes this.site.id in the build request Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -351,6 +351,7 @@ function hostingSiteDetail(siteId) {
|
||||
var result = await apiClient.post('/admin/hosting/sites/poc/build', {
|
||||
prospect_id: this.site.prospect_id,
|
||||
template_id: this.selectedTemplate,
|
||||
site_id: this.site.id,
|
||||
});
|
||||
this.pocResult = 'POC built! ' + result.pages_created + ' pages created.';
|
||||
Utils.showToast('POC built successfully', 'success');
|
||||
|
||||
Reference in New Issue
Block a user