title: How to get multiple middleware into one post
body: <p>i have something like this but i want to know how to use two middlewares so i can get something like in second router. The &quot;another middleware&quot; is to check if user is logged in.</p>
  <pre><code>router.post(&quot;/searchbook&quot;, authController.searchbook))
  
  
  
  router.post(&quot;/searchbook&quot;, another middleware, authController.search))
  </code></pre>