Could you please provide some hook samples?
Let's say I have an Express endpoint and before inserting in an specific set, I wish to do something and then proceed with the default behavior.
odataServer.beforeInsert((setName, doc, req, cb) => {
if (setName == 'documents') {
console.log('test!');
}
// you need to call cb to notify the async hook has finished
cb()
});
Hello,
Could you please provide some hook samples? Let's say I have an Express endpoint and before inserting in an specific set, I wish to do something and then proceed with the default behavior.
What I tried:
I see
test
logged in console but there is no response anymore. What should I do next?Thanks