From 3f1278366083d17952ce4d4fbc24b4ff6994e607 Mon Sep 17 00:00:00 2001 From: PTR-inc Date: Sat, 22 Feb 2025 18:10:31 +0100 Subject: [PATCH] Add unescape to getAllType function This is used in the reencode encrypted fields function --- db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db.js b/db.js index 81ea222c..134b230a 100644 --- a/db.js +++ b/db.js @@ -3013,7 +3013,7 @@ module.exports.CreateDB = function (parent, func) { if (id) { x._id = id; } obj.file.find(x, function (err, docs) { func(err, performTypedRecordDecrypt(docs)); }); }; - obj.GetAllType = function (type, func) { obj.file.find({ type: type }, function (err, docs) { func(err, performTypedRecordDecrypt(docs)); }); }; + obj.GetAllType = function (type, func) { obj.file.find({ type: type }, function (err, docs) { func(err, common.unEscapeAllLinksFieldName(performTypedRecordDecrypt(docs))); }); }; obj.GetAllIdsOfType = function (ids, domain, type, func) { obj.file.find({ type: type, domain: domain, _id: { $in: ids } }, function (err, docs) { func(err, performTypedRecordDecrypt(docs)); }); }; obj.GetUserWithEmail = function (domain, email, func) { obj.file.find({ type: 'user', domain: domain, email: email }, { type: 0 }, function (err, docs) { func(err, performTypedRecordDecrypt(docs)); }); }; obj.GetUserWithVerifiedEmail = function (domain, email, func) { obj.file.find({ type: 'user', domain: domain, email: email, emailVerified: true }, function (err, docs) { func(err, performTypedRecordDecrypt(docs)); }); };