title: Can a POST request accept two callbacks and can the first pass data to the second?
body: <p>I have the following <code>.post()</code> request:</p>
  
  <pre><code>const express = require('express');
  const router = express.Router();
  const search_controller = require('../controllers/searchController');
  const result_controller = require('../controllers/resultController');
  
  //Search Routes
  
  router.post('/', search_controller.search_create_post);
  
  module.exports = router;
  </code></pre>
  
  <p><br></p>
  
  <p>Could I add a second callback to it so that the first callback is run, then the second callback as such:</p>
  
  <pre><code>router.post('/', search_controller.search_create_post, result_controller.result_create_post)
  </code></pre>
  
  <p>Would I need a <code>next()</code> somewhere in those create functions? And could I also pass data from the <code>search_create_post</code> callback to the <code>result_create_post</code> callback? I would want to pass in the newly created Search object's id. </p>
  
  <p>My current <code>search_controller.search_create_post</code> function is a such:</p>
  
  <pre><code>exports.search_create_post = (req, res, next) =&gt; {
      let newSearch = new Search({ search_text: req.body.search_text });
  
      newSearch.save((err, savedSearch) =&gt; {
          if (err) {
              console.log(err);
          } else {
              res.send(savedSearch);
          }
      })
  };
  </code></pre>