diogogmt

Untitled

Mar 6th, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. exports.all = function (req, res) {
  2.   console.log("all notes route");
  3.  
  4.   //console.log("customer details route");
  5.   Customer.findOne({ _id : new ObjectId(req.params.id) }, function (err, customer) {
  6.     if(!customer){
  7.       console.log("get specific customer not successful");
  8.     }else{
  9.       var breadcrumb = {
  10.         cust : {
  11.           id : customer._id,
  12.           name : customer.firstName + " " + customer.lastName
  13.         }
  14.       }
  15.       req.session.breadcrumb = breadcrumb;
  16.       res.render('customer/custDetails_notes',
  17.         {
  18.           layout: 'includes/layout',
  19.           title: 'Customer',
  20.           customer: customer,
  21.           breadcrumb: breadcrumb,
  22.           errors: false
  23.         }
  24.       );
  25.     }
  26.   });
  27.  
  28. };
Advertisement
Add Comment
Please, Sign In to add comment