This commit is contained in:
Jake Kasper
2025-08-26 14:25:33 -04:00
parent 0b549ae642
commit 834c18f173

View File

@@ -34,10 +34,14 @@ const userProductIdParamSchema = Joi.object({
userProductId: Joi.number().integer().positive().required() userProductId: Joi.number().integer().positive().required()
}); });
const productIdParamSchema = Joi.object({
productId: Joi.number().integer().positive().required()
});
// @route GET /api/product-spreader-settings/product/:productId // @route GET /api/product-spreader-settings/product/:productId
// @desc Get spreader settings for a specific product // @desc Get spreader settings for a specific product
// @access Private // @access Private
router.get('/product/:productId', validateParams(idParamSchema), async (req, res, next) => { router.get('/product/:productId', validateParams(productIdParamSchema), async (req, res, next) => {
try { try {
const productId = req.params.productId; const productId = req.params.productId;