Disable Event Emitting on services #3198
Replies: 1 comment 1 reply
-
You can stop publishing all events on a service as shown here like this: // Prevent all events in the `password-reset` service from being published
app.service('password-reset').publish(() => null) You can also disable event emitting entirely (internally as well) by setting context.event to const disableEvents = (context: HookContext) => {
context.event = null
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, is there a way to disable the event emitting for specific services? Needed for some services that should not be emitting a respective data. I know it can be handle in publish and filter out the connection but its just too many since you have to specify every event names.
Beta Was this translation helpful? Give feedback.
All reactions