Is there any way to cancel an action hook on Directus before the data writing on database?
Ex. I want to send an complex email using a hook and not writing the data on database.
Yes, i know that Directus has a endpoint for email, but it's very simple and no meet my necessities.
To be clear: What is the method for canceling an action or filter? Anybody know?
Thanks a lot!
Using an event hook... by default, the Hooks occur after an event has happened. But you can append
:before
to the end to explicitly specify when the Hook should fire. This would allow you to send an email and/or cancel the action.https://docs.directus.io/extensions/hooks.html#creating-hooks