Guest User

Untitled

a guest
May 23rd, 2015
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. User.findOne({ sessionId: sessionId }, function(err, user) {
  2.   if (!user) return;
  3.  
  4.   Q.all([
  5.     Profile.findById(user.id).exec(),
  6.     Gallery.findById(user.id).exec()
  7.   ]).then(function(profile, gallery) {
  8.     if (!profile || ! gallery) return;
  9.  
  10.     var viewModel = {
  11.       profile: profile,
  12.       gallery: gallery
  13.     };
  14.   });
  15. });
Advertisement
Add Comment
Please, Sign In to add comment