feat: implement unified content engine to eliminate ID generation inconsistencies
- Create internal/engine module as single source of truth for content processing - Consolidate 4 separate ID generation systems into one unified engine - Update API handlers to use engine for consistent server-side ID generation - Remove frontend client-side ID generation, delegate to server engine - Ensure identical HTML markup + file path produces identical content IDs - Resolve content persistence failures caused by ID fragmentation between manual editing and enhancement processes
This commit is contained in:
@@ -42,12 +42,12 @@ type ElementContext struct {
|
||||
|
||||
// Request models
|
||||
type CreateContentRequest struct {
|
||||
ID string `json:"id,omitempty"` // For enhanced sites
|
||||
ElementContext *ElementContext `json:"element_context,omitempty"` // For non-enhanced sites
|
||||
SiteID string `json:"site_id,omitempty"`
|
||||
Value string `json:"value"`
|
||||
Type string `json:"type"`
|
||||
CreatedBy string `json:"created_by,omitempty"`
|
||||
HTMLMarkup string `json:"html_markup"` // HTML markup of the element
|
||||
FilePath string `json:"file_path"` // File path for consistent ID generation
|
||||
Value string `json:"value"` // Content value
|
||||
Type string `json:"type"` // Content type
|
||||
SiteID string `json:"site_id,omitempty"` // Site identifier
|
||||
CreatedBy string `json:"created_by,omitempty"` // User who created the content
|
||||
}
|
||||
|
||||
type RollbackContentRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user