fix: add vendor page creation endpoint and update JS logic
- Add POST /admin/content-pages/vendor endpoint for vendor overrides - Update JS to use /vendor or /platform endpoint based on vendor selection - Platform endpoint forces vendor_id=None, vendor endpoint requires vendor_id 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -163,10 +163,13 @@ function contentPageEditor(pageId) {
|
||||
this.successMessage = 'Page updated successfully!';
|
||||
contentPageEditLog.info('Page updated');
|
||||
} else {
|
||||
// Create new page
|
||||
response = await apiClient.post('/admin/content-pages/platform', payload);
|
||||
// Create new page - use vendor or platform endpoint based on selection
|
||||
const endpoint = this.form.vendor_id
|
||||
? '/admin/content-pages/vendor'
|
||||
: '/admin/content-pages/platform';
|
||||
response = await apiClient.post(endpoint, payload);
|
||||
this.successMessage = 'Page created successfully!';
|
||||
contentPageEditLog.info('Page created');
|
||||
contentPageEditLog.info('Page created', { endpoint, vendor_id: this.form.vendor_id });
|
||||
|
||||
// Redirect to edit page after creation
|
||||
const pageData = response.data || response;
|
||||
|
||||
Reference in New Issue
Block a user