8000 Allow flag to return the hook object by daffl · Pull Request #607 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

Allow flag to return the hook object#607

Merged
daffl merged 1 commit intomajorfrom
return-hooks
Jul 1, 2017
Merged

Allow flag to return the hook object#607
daffl merged 1 commit intomajorfrom
return-hooks

Conversation

@daffl
Copy link
Member
@daffl daffl commented Jun 29, 2017

This will be used by the updated providers (primarily to retrieve hook.dispatch which will contain the "safe" data to send to a client). Allows to do something like:

app.service('dummy').find({
  __returnHook: true
}).then(hook => {
  // hook is the actual hook object instead of just the result
});

@ekryski
Copy link
Contributor
ekryski commented Jun 29, 2017

Looks good @daffl do we have a test somewhere that actually makes sure the hook object is returned when the flag is set? The default is falsey I'm assuming.

@daffl
Copy link
Member Author
daffl commented Jun 29, 2017

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

Successfully merging this pull request may close these issues.

2 participants

0