From 34e193fb92919d5f5aace36dc15b4baac4f756b5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 8 Mar 2026 20:24:50 +0100 Subject: [PATCH] Debug: Notification config save/toggle logging Co-Authored-By: Claude Opus 4.6 --- server/src/plugins/notifications/index.ts | 1 + web/src/plugins/streaming/StreamingTab.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/server/src/plugins/notifications/index.ts b/server/src/plugins/notifications/index.ts index 98afae8..bd30a9b 100644 --- a/server/src/plugins/notifications/index.ts +++ b/server/src/plugins/notifications/index.ts @@ -224,6 +224,7 @@ const notificationsPlugin: Plugin = { // Save config app.post('/api/notifications/config', requireAdmin, (req, res) => { + console.log(`${NB} Save request body:`, JSON.stringify(req.body)); const { channels } = req.body ?? {}; if (!Array.isArray(channels)) { res.status(400).json({ error: 'channels array erforderlich' }); return; } // Validate each channel config diff --git a/web/src/plugins/streaming/StreamingTab.tsx b/web/src/plugins/streaming/StreamingTab.tsx index 839850e..0898b2b 100644 --- a/web/src/plugins/streaming/StreamingTab.tsx +++ b/web/src/plugins/streaming/StreamingTab.tsx @@ -613,6 +613,7 @@ export default function StreamingTab({ data }: { data: any }) { }, [isAdmin, loadNotifyConfig]); const toggleChannelEvent = useCallback((channelId: string, channelName: string, guildId: string, guildName: string, event: string) => { + console.log('[Notifications] Toggle:', channelId, channelName, event); setNotifyConfig(prev => { const existing = prev.find(c => c.channelId === channelId); if (existing) { @@ -631,6 +632,7 @@ export default function StreamingTab({ data }: { data: any }) { }, []); const saveNotifyConfig = useCallback(async () => { + console.log('[Notifications] Saving config, notifyConfig:', JSON.stringify(notifyConfig)); setConfigSaving(true); try { const resp = await fetch('/api/notifications/config', {