This commit is contained in:
Ylian Saint-Hilaire 2021-06-22 08:40:26 -07:00
parent 6a37d04b55
commit f48536c40d
1 changed files with 2 additions and 2 deletions

4
db.js
View File

@ -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);