diff --git a/backend/src/routes/products.ts b/backend/src/routes/products.ts index 4d24a5f..caad045 100644 --- a/backend/src/routes/products.ts +++ b/backend/src/routes/products.ts @@ -129,11 +129,13 @@ router.put('/:id', async (req: AuthRequest, res: Response) => { return; } - const { name, refresh_interval } = req.body; + const { name, refresh_interval, price_drop_threshold, notify_back_in_stock } = req.body; const product = await productQueries.update(productId, userId, { name, refresh_interval, + price_drop_threshold, + notify_back_in_stock, }); if (!product) { diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx index 299fb2f..963c6bb 100644 --- a/frontend/src/pages/Settings.tsx +++ b/frontend/src/pages/Settings.tsx @@ -46,7 +46,8 @@ export default function Settings() { setSettings(response.data); setTelegramBotToken(''); setSuccess('Telegram settings saved successfully'); - } catch { + } catch (err) { + console.error('Telegram save error:', err); setError('Failed to save Telegram settings'); } finally { setIsSaving(false); @@ -64,7 +65,8 @@ export default function Settings() { setSettings(response.data); setDiscordWebhookUrl(''); setSuccess('Discord settings saved successfully'); - } catch { + } catch (err) { + console.error('Discord save error:', err); setError('Failed to save Discord settings'); } finally { setIsSaving(false);