Fix for #2801.
This commit is contained in:
parent
6a37d04b55
commit
f48536c40d
4
db.js
4
db.js
|
@ -1563,8 +1563,8 @@ module.exports.CreateDB = function (parent, func) {
|
||||||
|
|
||||||
var dbname = 'meshcentral';
|
var dbname = 'meshcentral';
|
||||||
if (parent.args.mongodbname) { dbname = parent.args.mongodbname; }
|
if (parent.args.mongodbname) { dbname = parent.args.mongodbname; }
|
||||||
else if (parent.args.mariadb.database) { dbname = parent.args.mariadb.database; }
|
else if ((typeof parent.args.mariadb == 'object') && (typeof parent.args.mariadb.database == 'string')) { dbname = parent.args.mariadb.database; }
|
||||||
else if (parent.args.mysql.database) { dbname = parent.args.mysql.database; }
|
else if ((typeof parent.args.mysql == 'object') && (typeof parent.args.mysql.database == 'string')) { dbname = parent.args.mysql.database; }
|
||||||
|
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
const fileSuffix = currentDate.getFullYear() + '-' + padNumber(currentDate.getMonth() + 1, 2) + '-' + padNumber(currentDate.getDate(), 2) + '-' + padNumber(currentDate.getHours(), 2) + '-' + padNumber(currentDate.getMinutes(), 2);
|
const fileSuffix = currentDate.getFullYear() + '-' + padNumber(currentDate.getMonth() + 1, 2) + '-' + padNumber(currentDate.getDate(), 2) + '-' + padNumber(currentDate.getHours(), 2) + '-' + padNumber(currentDate.getMinutes(), 2);
|
||||||
|
|
Loading…
Reference in New Issue