mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 10:42:57 +00:00
dev day #79
This commit is contained in:
@@ -117,7 +117,14 @@ func (c *EditorPreviewController) ApplyPreviewChanges(ctx *gin.Context) {
|
||||
"created_at": time.Now(),
|
||||
"updated_at": time.Now(),
|
||||
}
|
||||
|
||||
|
||||
// Persist custom styles into settings JSON under settings.styles for compatibility
|
||||
if len(elem.CustomStyles) > 0 {
|
||||
config["settings"] = map[string]interface{}{
|
||||
"styles": elem.CustomStyles,
|
||||
}
|
||||
}
|
||||
|
||||
if err := tx.Table("page_element_configs").Create(config).Error; err != nil {
|
||||
tx.Rollback()
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to save configuration"})
|
||||
|
||||
Reference in New Issue
Block a user