title: conflict route in node js express
body: <p>I have an issue about my routes, i want to delete data form a page which contains blogs and comments,</p>
  <p>I want to send a request to delete the comments with this script :</p>
  <pre><code>       trashcan.addEventListener('click', e =&gt; {
         const endpoint = `/admin/blog/details/${deleteBlog.dataset.doc}`;
  
         fetch(endpoint, {
             method: 'DELETE'
         })
         .then(response =&gt; {
             return response.json();
         })
         .then(data =&gt; window.location.href =  data.redirect)
         .catch(err =&gt; console.log(err))
     })
  </code></pre>
  <p>and</p>
  <pre><code>trashcan.addEventListener('click', e =&gt; {
    const endpoint = `/admin/blog/details/${deleteCom.dataset.doc}`;
  fetch(endpoint, {
    method: 'DELETE'
  })
  .then(response =&gt; {
    return response.json();
  })
  .then(data =&gt; window.location.href =  data.redirect)
  .catch(err =&gt; console.log(err))
  })
  </code></pre>
  <p>but the route choose the blogs route,
  even i renamed the url parameter id with different name, but always req.params stay the same .</p>
  <p>the routes:</p>
  <pre><code>//delete blog
  router.delete('/blog/details/:id', adminBlogController.blog_delete);
  //delete comment
  router.delete('/blog/details/:comment_id', adminBlogController.comment_delete)
  </code></pre>
  <p>I need a way to pass the specific id and check it in the route before handle the request so it can choose the matched route.</p>