On the server side, we can listen for these events:
// before event
M.on("crud:createEventB", function (request, callback) {
// do another db request
foo(request, function (err, data) {
if (err) { return callback(err); }
request.query.something = data.something;
callback(null, request);
});
});
// after event
M.on("crud:createEventA", function (request, err, data, readCount, callback) {
// handle error message
// then send the callback
callback(err, data, readCount);
});
After merging this pull request, we will be able to have configurations like this:
or
On the server side, we can listen for these events: