Hi All,
First of all; i'm very very pleased with the new DML capabilities in 2.2 beta, good job!
Now for the question:
I'm trying to create some sort of audit functionality for all calls made to the database.
The idea i had was to create a route like so:
{
"middleware": [
{
"url": {
"match": "/_api/*"
},
"action": {
"do": "audit/capture"
}
}
]
}
and the audit/capture is a simple piece of code in the _modules collection:
....
function capture(req, res, options, next) {
next();
}
What i was expecting was to see any call to /_db/mydb/_api/* to be logged but it does not as it seems.
I flushed modules and reloaded routing etc but can't seem to get it to work.
Anyone with experience on this?
Thnx!
Regards,
Martijn