Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It does not work inside a method #36

Open
rogeriojlle opened this issue Jun 15, 2015 · 0 comments
Open

It does not work inside a method #36

rogeriojlle opened this issue Jun 15, 2015 · 0 comments

Comments

@rogeriojlle
Copy link

var messaging = new Meteor.Stream('messaging');
Meteor.methods({
  "adLogin" : function(req){
    if( req.username && req.domain && req.password){
      var retval = adLogin(req.username, req.domain, req.password);
    } else {
      console.log('não recebi os parâmetros que preciso.', req);
      return false;
    }
    if (retval.success == true){
      return retval.result;
    }
    console.log(retval.result);
    messaging.emit('loginProcessFailed', retval.result);
    return false;
  }
});

The method always ends before the actions of "messaging" happen.
Why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant