apps/manage-a-book-trading-club/app/controllers/requestsController.js
/*
 * Home base for creating a request
 *  - goto edit list of books to give
 *  - goto edit list of books to take
 *  - submit the lists to create the request
 */
Home base for creating a request
- goto edit list of books to give
- goto edit list of books to take
- submit the lists to create the request
Home base for creating a request - goto edit list of books to give - goto edit list of books to take - submit the lists to create the request
function newRequest(req, res) {
  const gives = (req.session.gives || []);
  const takes = req.session.takes || [];
  res.render('requests/new', {
    title: 'New Request',
    user: req.user,
    gives,
    takes,
    messages: req.flash('info'),
  });
}
function newRequest ( req , res ) { const gives = ( req . session . gives || [ ] ) ; const takes = req . session . takes || [ ] ; res . render ( 'requests/new' , { title : 'New Request' , user : req . user , gives , takes , messages : req . flash ( 'info' ) , } ) ; }
Home base for creating a request
  - goto edit list of books to give
  - goto edit list of books to take
  - submit the lists to create the request
Home base for creating a request - goto edit list of books to give - goto edit list of books to take - submit the lists to create the request
// gives and takes are stored in the session