From 6563ca23c7d9f3e6686740fbe5fd63639a669b0d Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Fri, 27 Mar 2026 09:24:05 +0100 Subject: [PATCH] fix(router): update stock and inventory routes to support optional branchId parameter - Modified the stock and inventory routes to allow an optional branchId parameter, improving flexibility in API requests. --- backend/routers/falukantRouter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/routers/falukantRouter.js b/backend/routers/falukantRouter.js index 8b028fd..031d791 100644 --- a/backend/routers/falukantRouter.js +++ b/backend/routers/falukantRouter.js @@ -22,10 +22,10 @@ router.post('/production', falukantController.createProduction); router.get('/production/:branchId', falukantController.getProduction); router.get('/stocktypes', falukantController.getStockTypes); router.get('/stockoverview', falukantController.getStockOverview); -router.get('/stock/?:branchId', falukantController.getStock); +router.get('/stock/:branchId?', falukantController.getStock); router.post('/stock', falukantController.createStock); router.get('/products', falukantController.getProducts); -router.get('/inventory/?:branchId', falukantController.getInventory); +router.get('/inventory/:branchId?', falukantController.getInventory); router.post('/sell/all', falukantController.sellAllProducts); router.post('/sell', falukantController.sellProduct); router.post('/moneyhistory', falukantController.moneyHistory);