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

update is required for this mixin to work with loopback 3 #11

Open
ebarault opened this issue Nov 9, 2016 · 1 comment
Open

update is required for this mixin to work with loopback 3 #11

ebarault opened this issue Nov 9, 2016 · 1 comment

Comments

@ebarault
Copy link

ebarault commented Nov 9, 2016

the mixin does not currently handle the new loopback 3 methods patchAttributes and replaceById, this could easily be updated by adding the following code:

  // loopback 3
  Model.beforeRemote('prototype.patchAttributes', function(ctx, modelInstance, next) {
      Model.stripReadOnlyProperties(ctx, modelInstance, next);
  });
  Model.beforeRemote('replaceById', function(ctx, modelInstance, next) {
    Model.stripReadOnlyProperties(ctx, modelInstance, next);
  });

"loopback": "3.0.0"

@ebarault ebarault changed the title Does this mixin work with loopback 3? update is required for this mixin to work with loopback 3 Nov 9, 2016
@johncpang
Copy link

I checked the source and those two functions are added. This issue should be closed (resolved), right?

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

2 participants