0
 return Group.findOne({'members._id':id}).then((groupUserIsIn) =>{
    return groupUserIsIn;
});


Group 

is a database Schema (MongoDB)

Is this promise resolved with the value groupUserIsIn? To access this value, we need another promise with a .then?

user7361276
  • 229
  • 2
  • 4
  • 11
  • 2
    Do not ask the same question twice. This is a dup of http://stackoverflow.com/questions/41435034/difference-between-resolve-and-return-in-promise-js/41435790#41435790. –  Jan 03 '17 at 06:28
  • 1
    It is ok to ask basic questions, but you should at least try to do some research yourself. There is [StackOverflow docs: Promise](http://stackoverflow.com/documentation/javascript/231/promises#t=201701030634208582945), and various questions targeting promises. And as _torazaburo_ said, it is not clear how this questions is different to the one you already asked. Your given example does not make sense, why do you want to return the resolved value without using or changing it, your `then` is completely useless here. – t.niese Jan 03 '17 at 06:37

0 Answers0