@growy/strapi-plugin-encrypted-field 1.8.0 → 1.8.1
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 +1 -1
- package/server/bootstrap.js +6 -3
package/package.json
CHANGED
package/server/bootstrap.js
CHANGED
|
@@ -113,8 +113,9 @@ module.exports = ({ strapi }) => {
|
|
|
113
113
|
if (Object.prototype.hasOwnProperty.call(result, key)) {
|
|
114
114
|
const value = result[key];
|
|
115
115
|
if (typeof value === 'string' && value) {
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
const decrypted = decrypt(value, strapi);
|
|
117
|
+
strapi.log.info(`Descifrando campo ${key} en ${event.model.uid}: ${value.substring(0, 20)}... -> ${decrypted}`);
|
|
118
|
+
result[key] = decrypted;
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
}
|
|
@@ -135,7 +136,9 @@ module.exports = ({ strapi }) => {
|
|
|
135
136
|
if (Object.prototype.hasOwnProperty.call(item, key)) {
|
|
136
137
|
const value = item[key];
|
|
137
138
|
if (typeof value === 'string' && value) {
|
|
138
|
-
|
|
139
|
+
const decrypted = decrypt(value, strapi);
|
|
140
|
+
strapi.log.info(`Descifrando campo ${key}: ${value.substring(0, 20)}... -> ${decrypted}`);
|
|
141
|
+
item[key] = decrypted;
|
|
139
142
|
}
|
|
140
143
|
}
|
|
141
144
|
}
|