This commit is contained in:
Jake Kasper
2025-08-25 13:31:08 -04:00
parent ae4f2990cf
commit fefd22f696
2 changed files with 10 additions and 1 deletions

View File

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