@dynamatix/cat-shared 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ function applyAuditMiddleware(schema, collectionName) {
20
20
  contextId
21
21
  };
22
22
  if (onAuditLogCreated) {
23
- onAuditLogCreated(logs); // 👈 Call the hook with the logs
23
+ onAuditLogCreated(logs, contextId); // 👈 Call the hook with the logs
24
24
  }
25
25
 
26
26
  await AuditLog.create(log);
@@ -61,7 +61,7 @@ function applyAuditMiddleware(schema, collectionName) {
61
61
 
62
62
  if (logs.length) await AuditLog.insertMany(logs);
63
63
  if (onAuditLogCreated) {
64
- onAuditLogCreated(logs); // 👈 Call the hook with the logs
64
+ onAuditLogCreated(logs, contextId); // 👈 Call the hook with the logs
65
65
  }
66
66
  });
67
67
  }
@@ -1,2 +1,2 @@
1
1
  export {default as applyAuditMiddleware} from './audit.middleware.js';
2
- export {default as registerAuditHook } from './audit.middleware.js';
2
+ export { registerAuditHook } from './audit.middleware.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/cat-shared",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"