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

Just want to make sure to kick request from before method #1

Open
yozawiratama opened this issue Oct 26, 2021 · 0 comments
Open

Just want to make sure to kick request from before method #1

yozawiratama opened this issue Oct 26, 2021 · 0 comments

Comments

@yozawiratama
Copy link

Meteor.registerBeforeMethod('startTimer', function() {
  if(!this.userId) return false; // <- just make it  not undefined
  else return
});

If MIDLEWARES or BEFORE METHODS returns something different from UNDEFINED the execution stops and return this value!

so in my case if user unauthorized, just make it return something?

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