We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, does it possible to use these common hooks in a custom generate hook?
I try this but doesn't work.
const {preventChanges} = require('feathers-hooks-common'); module.exports = (options = {}) => { return async context => { if(context.method === 'patch'){ preventChanges(true, 'type'); } return context; }; };
The text was updated successfully, but these errors were encountered:
It needs to be called with the context and also add an await in case it is asynchronous:
context
await
const {preventChanges} = require('feathers-hooks-common'); module.exports = (options = {}) => { return async context => { if(context.method === 'patch'){ await preventChanges(true, 'type')(context); } return context; }; };
Sorry, something went wrong.
No branches or pull requests
Hello, does it possible to use these common hooks in a custom generate hook?
I try this but doesn't work.
The text was updated successfully, but these errors were encountered: