i have an express routing file where i define all my routes . The problem is when i have tow routes with similar urls for example :
router.get('/:categoryId/', getProductsByCategory)
router.get('/:productId', getProduct)
and try to test with postman it always exacute the first route in order no matter which route i test so if the route with categoryId is above in the file it will execute getProductsByCategory even if i put the other url with productId and vide versa . I searched on internet but didn't find this issue anywhere. Thank you for your help !