Add route handler for updating multiple stock events in stockevents.js

This commit is contained in:
Tom Butcher 2025-12-27 14:03:38 +00:00
parent 361689cef4
commit 5a16890b7a

View File

@ -8,6 +8,7 @@ import {
getStockEventRouteHandler, getStockEventRouteHandler,
newStockEventRouteHandler, newStockEventRouteHandler,
editStockEventRouteHandler, editStockEventRouteHandler,
editMultipleStockEventsRouteHandler,
deleteStockEventRouteHandler, deleteStockEventRouteHandler,
listStockEventsByPropertiesRouteHandler, listStockEventsByPropertiesRouteHandler,
getStockEventStatsRouteHandler, getStockEventStatsRouteHandler,
@ -51,6 +52,11 @@ router.get('/:id', isAuthenticated, (req, res) => {
getStockEventRouteHandler(req, res); getStockEventRouteHandler(req, res);
}); });
// update multiple stock events
router.put('/', isAuthenticated, async (req, res) => {
editMultipleStockEventsRouteHandler(req, res);
});
router.put('/:id', isAuthenticated, async (req, res) => { router.put('/:id', isAuthenticated, async (req, res) => {
editStockEventRouteHandler(req, res); editStockEventRouteHandler(req, res);
}); });