fix: navigation under weeks switch

This commit is contained in:
kilyabin
2025-11-26 00:10:55 +04:00
parent 2cd392595f
commit 423178aefb
8 changed files with 123 additions and 35 deletions

View File

@@ -34,7 +34,11 @@ async function handler(
try {
saveSettings(settings)
res.status(200).json({ success: true, settings })
// Сбрасываем кеш и загружаем свежие настройки для подтверждения
const { clearSettingsCache } = await import('@/shared/data/settings-loader')
clearSettingsCache()
const savedSettings = loadSettings()
res.status(200).json({ success: true, settings: savedSettings })
} catch (error) {
console.error('Error saving settings:', error)
res.status(500).json({ error: 'Failed to save settings' })