Guest User

Untitled

a guest
May 23rd, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function doYoba(callback) {
  2. Flowy.chain(function(){
  3. _db.getProfile(sessionId, this.slot());
  4. })
  5. .then(function(err, user){
  6. if (!user) {
  7. callback(null);
  8. }
  9.  
  10. Flowy.chain(function(){
  11. _db.getGalleries(this.slot());
  12. _db.getProfile(this.slot());
  13. })
  14. .then(function(err, gallery, profile){
  15. var viewModel = {
  16. profile: profile,
  17. gallery: gallery
  18. };
  19. callback(viewModel)
  20. });
  21.  
  22. });
  23. }
Advertisement
Add Comment
Please, Sign In to add comment