feat: implement single POST upsert API with automatic ID generation
- Replace separate POST/PUT endpoints with unified POST upsert - Add automatic content ID generation from element context when no ID provided - Implement version history preservation before content updates - Add element context support for backend ID generation - Update frontend to use single endpoint for all content operations - Enhanced demo site with latest database content including proper content IDs
This commit is contained in:
@@ -50,12 +50,6 @@ type CreateContentRequest struct {
|
||||
CreatedBy string `json:"created_by,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateContentRequest struct {
|
||||
Value string `json:"value"`
|
||||
Type string `json:"type,omitempty"`
|
||||
UpdatedBy string `json:"updated_by,omitempty"`
|
||||
}
|
||||
|
||||
type RollbackContentRequest struct {
|
||||
VersionID int64 `json:"version_id"`
|
||||
RolledBackBy string `json:"rolled_back_by,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user