mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-09 21:49:43 -05:00
Added way to remove test agents.
This commit is contained in:
2
db.js
2
db.js
@@ -1133,7 +1133,7 @@ module.exports.CreateDB = function (parent, func) {
|
||||
obj.GetAllIdsOfType = function (ids, domain, type, func) { obj.file.find({ type: type, domain: domain, _id: { $in: ids } }).toArray(function (err, docs) { func(err, performTypedRecordDecrypt(docs)); }); };
|
||||
obj.GetUserWithEmail = function (domain, email, func) { obj.file.find({ type: 'user', domain: domain, email: email }).toArray(function (err, docs) { func(err, performTypedRecordDecrypt(docs)); }); };
|
||||
obj.GetUserWithVerifiedEmail = function (domain, email, func) { obj.file.find({ type: 'user', domain: domain, email: email, emailVerified: true }).toArray(function (err, docs) { func(err, performTypedRecordDecrypt(docs)); }); };
|
||||
obj.Remove = function (id, func) { obj.file.deleteOne({ _id: id }, func); };
|
||||
obj.Remove = function (id, func) { obj.file.deleteOne({ _id: id }, func); }; // TODO: May want to do bulk removes to speed up the database.
|
||||
obj.RemoveAll = function (func) { obj.file.deleteMany({}, { multi: true }, func); };
|
||||
obj.RemoveAllOfType = function (type, func) { obj.file.deleteMany({ type: type }, { multi: true }, func); };
|
||||
obj.InsertMany = function (data, func) { obj.file.insertMany(data, func); };
|
||||
|
||||
Reference in New Issue
Block a user