title: TypeError: Cannot destructure property 'userId' of 'req.body' as it is undefined
body: <p>Every Time I try to do a post request in postman to <em><a href="http://localhost:3000/api/orders/new" rel="nofollow noreferrer">http://localhost:3000/api/orders/new</a></em></p>
  
  <p>I am getting this error:
  **TypeError: Cannot destructure property 'userId' of 'req.body' as it is undefined.
      at C:\Users\Web-Developer\Desktop\shoppy\backend\routes\orders.js:70:10
      at Layer.handle [as handle_request] (C:\Users\Web-Developer\Desktop\shoppy\backend\node_modules\express\lib\router\layer.js:95:5)
      at next (C:\Users\Web-Developer\Desktop\shoppy\backend\node_modules\express\lib\router\route.js:137:13)
      at Route.dispatch (C:\Users\Web-Developer\Desktop\shoppy\backend\node_modules\express\lib\router\route.js:112:3)
      at Layer.handle [as handle_request] (C:\Users\Web-Developer\Desktop\shoppy\backend\node_modules\express\lib\router\layer.js:95:5)
      at C:\Users\Web-Developer\Desktop\shoppy\backend\node_modules\express\lib\router\index.js:281:22
      at Function.process_params (C:\Users\Web-Developer\Desktop\shoppy\backend\node_modules\express\lib\router\index.js:335:12)
      at next (C:\Users\Web-Developer\Desktop\shoppy\backend\node_modules\express\lib\router\index.js:275:10)
      at Function.handle (C:\Users\Web-Developer\Desktop\shoppy\backend\node_modules\express\lib\router\index.js:174:3)
      at router (C:\Users\Web-Developer\Desktop\shoppy\backend\node_modules\express\lib\router\index.js:47:12)
  **</p>
  
  <pre><code>const router = express.Router();
  const {database} = require('../config/helpers');
  
  /* GET ALL ORDERS */
  router.get('/', (req, res) =&gt; {
      database.table('orders_details as od')
          .join([
              {
                  table: 'orders as o',
                  on: 'o.id = od.order_id'
              },
              {
                  table: 'products as p',
                  on: 'p.id = od.product_id'
              },
              {
                  table: 'users as u',
                  on: 'u.id = o.user_id'
              }
          ])
          .withFields(['o.id', 'p.title as name', 'p.description', 'p.price', 'u.username'])
          .sort({id: 1})
          .getAll()
          .then(orders =&gt; {
              if(orders.length &gt; 0) {
                  res.status(200).json(orders);
              } else {
                  res.json({message: 'Mo Orders Found'})
              }
          }).catch(err =&gt; console.log(err));
  })
  
  
  /* GET SINGLE ORDER */
  router.get('/:id', (req, res) =&gt; {
  
      const orderId = req.params.id;
  
      database.table('orders_details as od')
          .join([
              {
                  table: 'orders as o',
                  on: 'o.id = od.order_id'
              },
              {
                  table: 'products as p',
                  on: 'p.id = od.product_id'
              },
              {
                  table: 'users as u',
                  on: 'u.id = o.user_id'
              }
          ])
          .withFields(['o.id', 'p.title as name', 'p.description', 'p.price', 'u.username'])
          .filter({'o.id': orderId})
          .getAll()
          .then(orders =&gt; {
              if(orders.length &gt; 0) {
                  res.status(200).json(orders);
              } else {
                  res.json({message: `No Orders Found with orderId ${orderId}`})
              }
          }).catch(err =&gt; console.log(err));
  })
  
  /* PLACE A NEW ORDER */
  router.post('/new', (req, res) =&gt; {
  
      let {userId, products} = req.body;
      console.log(userId, products)
  })
  
  module.exports = router
  </code></pre>