mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-22 22:17:31 +03:00
use new nedb instead of old
This commit is contained in:
parent
b1d2d1aea9
commit
7ea744fdfe
5
db.js
5
db.js
@ -3181,7 +3181,10 @@ module.exports.CreateDB = function (parent, func) {
|
|||||||
|
|
||||||
// Transfer NeDB data into the current database
|
// Transfer NeDB data into the current database
|
||||||
obj.nedbtodb = function (func) {
|
obj.nedbtodb = function (func) {
|
||||||
var nedbDatastore = require('nedb');
|
var nedbDatastore = null;
|
||||||
|
try { nedbDatastore = require('@yetzt/nedb'); } catch (ex) { } // This is the NeDB with fixed security dependencies.
|
||||||
|
if (nedbDatastore == null) { nedbDatastore = require('nedb'); } // So not to break any existing installations, if the old NeDB is present, use it.
|
||||||
|
|
||||||
var datastoreOptions = { filename: parent.getConfigFilePath('meshcentral.db'), autoload: true };
|
var datastoreOptions = { filename: parent.getConfigFilePath('meshcentral.db'), autoload: true };
|
||||||
|
|
||||||
// If a DB encryption key is provided, perform database encryption
|
// If a DB encryption key is provided, perform database encryption
|
||||||
|
Loading…
Reference in New Issue
Block a user