@dynamatix/gb-schemas 0.21.4 → 0.21.6
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/applications/application-illustration-model.js +1 -1
- package/applications/application-legal.model.js +1 -1
- package/applications/application-offer.model.js +1 -1
- package/package.json +1 -1
- package/users/permission.model.js +1 -1
- package/users/role-group.model.js +1 -1
- package/users/role.model.js +1 -1
- package/utils/encryption.middleware.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
|
-
import mongooseEncryption from "../utils/encryption.middleware";
|
|
2
|
+
import mongooseEncryption from "../utils/encryption.middleware.js";
|
|
3
3
|
|
|
4
4
|
const illustrationSchema = new mongoose.Schema({
|
|
5
5
|
date: { type: Date } // e.g., the date of illustration
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
|
-
import mongooseEncryption from "../utils/encryption.middleware";
|
|
2
|
+
import mongooseEncryption from "../utils/encryption.middleware.js";
|
|
3
3
|
|
|
4
4
|
const offerSchema = new mongoose.Schema({
|
|
5
5
|
date: { type: Date } // The date associated with the offer
|
package/package.json
CHANGED
package/users/role.model.js
CHANGED
|
@@ -24,7 +24,7 @@ export default function mongooseEncryption(schema, options) {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
// Encrypt before bulkWrite operations
|
|
27
|
-
schema.pre("bulkWrite", function (
|
|
27
|
+
schema.pre("bulkWrite", function (next, operations) {
|
|
28
28
|
operations.forEach(operation => {
|
|
29
29
|
if (operation.insertOne && operation.insertOne.document) {
|
|
30
30
|
operation.insertOne.document = encryptObject(operation.insertOne.document, collectionName);
|