mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-13 16:03:20 -05:00
Type updates for NeDB
This commit is contained in:
parent
b3731ad27f
commit
942eafb70d
4
db.js
4
db.js
@ -897,10 +897,10 @@ module.exports.CreateDB = function (parent, func) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add a plugin
|
// Add a plugin
|
||||||
obj.addPlugin = function (plugin, func) { obj.pluginsfile.insert(plugin, func); };
|
obj.addPlugin = function (plugin, func) { plugin.type = "plugin"; obj.pluginsfile.insert(plugin, func); };
|
||||||
|
|
||||||
// Get all plugins
|
// Get all plugins
|
||||||
obj.getPlugins = function (func) { obj.pluginsfile.find().sort({ name: 1 }).exec(func); };
|
obj.getPlugins = function (func) { obj.pluginsfile.find({"type": "plugin"}, {"type": 0}).sort({ name: 1 }).exec(func); };
|
||||||
|
|
||||||
// Get plugin
|
// Get plugin
|
||||||
obj.getPlugin = function (id, func) { obj.pluginsfile.find({ _id: id }).sort({ name: 1 }).exec(func); };
|
obj.getPlugin = function (id, func) { obj.pluginsfile.find({ _id: id }).sort({ name: 1 }).exec(func); };
|
||||||
|
Loading…
Reference in New Issue
Block a user