Skip to content
New issue

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

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

Already on GitHub? # to your account

Wrong params for makeCallingParams #7

Closed
nikis opened this issue Dec 31, 2018 · 2 comments
Closed

Wrong params for makeCallingParams #7

nikis opened this issue Dec 31, 2018 · 2 comments

Comments

@nikis
Copy link

nikis commented Dec 31, 2018

When using loaderFactory method is calling custom makeCallingParams which create new context. By the default this function shoud include ['provider', 'authenticated', 'user'] from given context, but this not happening because this properites is trying to get from context not from context.params.

if (include) {
    (Array.isArray(include) ? include : [include]).forEach(name => {
      if (name in context) included[name] = context[name];
    });
  }

to work like original makeCallingParams need to change to this:

if (name in context.params) included[name] = context.params[name];

or just to use makeCallingParams

@eddyystop
Copy link
Collaborator

Changed it to

if (context.params && name in context.params) included[name] = context.params[name];

There remains an incompatibility in that BatchLoader version includes paginate: false as a default.

People can seemingly delay upgrading Feathers versions as long as possible. So I'd prefer leaving batch-loader woking with v4 rather than force an update to v4 feathers-hooks-common.

Published as v0.3.6

@eddyystop
Copy link
Collaborator

eddyystop commented Jan 2, 2019

Closing. Feel free to reopen if necessary.

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

No branches or pull requests

2 participants