mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-03 18:22:57 +00:00
gr
This commit is contained in:
@@ -4553,9 +4553,6 @@ func (bc *BaseController) UpdateSettings(c *gin.Context) {
|
||||
if body.MapStyle != nil {
|
||||
s.MapStyle = strings.TrimSpace(*body.MapStyle)
|
||||
}
|
||||
if body.ShowMapOnHomepage != nil {
|
||||
s.ShowMapOnHomepage = *body.ShowMapOnHomepage
|
||||
}
|
||||
|
||||
if s.ID == 0 {
|
||||
if err := bc.DB.Create(&s).Error; err != nil {
|
||||
@@ -4569,6 +4566,11 @@ func (bc *BaseController) UpdateSettings(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
logger.Info("UpdateSettings saved: club_id=%s club_name=%s gallery_url=%s gallery_label=%s", s.ClubID, s.ClubName, s.GalleryURL, s.GalleryLabel)
|
||||
// Best-effort: trigger prefetch so cached settings.json and dependent files update immediately
|
||||
go func() {
|
||||
base := getPrefetchBaseURL()
|
||||
services.PrefetchOnce(base)
|
||||
}()
|
||||
// If gallery_url is a Zonerama link, refresh Zonerama cache immediately
|
||||
if g := strings.TrimSpace(s.GalleryURL); g != "" && strings.Contains(strings.ToLower(g), "zonerama.com") {
|
||||
go func(link string) { _ = services.RefreshZoneramaNow(link) }(g)
|
||||
|
||||
Reference in New Issue
Block a user