@dynamatix/gb-schemas 0.21.7 → 0.21.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "0.21.7",
3
+ "version": "0.21.8",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -39,10 +39,10 @@ export default function mongooseEncryption(schema, options) {
39
39
 
40
40
  // Decrypt after bulkWrite operations
41
41
  schema.post("bulkWrite", function (result) {
42
- result.result.insertedDocs.forEach(doc => {
42
+ result.result.insertedIds.forEach(doc => {
43
43
  doc.set(decryptObject(doc.toObject(), collectionName)); // Decrypt document fields
44
44
  });
45
- result.result.modifiedDocs.forEach(doc => {
45
+ result.result.upserted.forEach(doc => {
46
46
  doc.set(decryptObject(doc.toObject(), collectionName)); // Decrypt document fields
47
47
  });
48
48
  });