Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- User.findOne({ sessionId: sessionId }, function(err, user) {
- if (!user) return;
- Q.all([
- Profile.findById(user.id).exec(),
- Gallery.findById(user.id).exec()
- ]).then(function(profile, gallery) {
- if (!profile || ! gallery) return;
- var viewModel = {
- profile: profile,
- gallery: gallery
- };
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment