asdfasdf
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user