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

this.userId in server-side reducers #395

Open
Floriferous opened this issue Nov 1, 2019 · 1 comment
Open

this.userId in server-side reducers #395

Floriferous opened this issue Nov 1, 2019 · 1 comment

Comments

@Floriferous
Copy link
Contributor

It would be helpful to have access to this.userId inside the reduce function of a server-only reducer! Since it's running inside a method context, this should be doable.

Current workaround: use Meteor.userId();

@bhunjadi
Copy link
Contributor

bhunjadi commented Nov 1, 2019

Agreed!

If I'm not mistaken, for server we have this order of execution hypernovaInit -> prepareForDelivery -> applyReducers. Since hypernovaInit already receives userId we could just pass this all the way down to applyReducers & compute() function in reducerNode.

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

No branches or pull requests

3 participants