Fix product update route to include notification settings

Add price_drop_threshold and notify_back_in_stock to PUT /products/:id

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
clucraft 2026-01-20 22:18:44 -05:00
parent 09b7e66758
commit 59db0f5bb0
2 changed files with 7 additions and 3 deletions

View file

@ -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) {