mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-26 06:03:15 -05:00
Fix for PostgreSQL DB creation using a database name, #3581
This commit is contained in:
parent
b9b334e8a2
commit
39e1255ebe
1
db.js
1
db.js
@ -680,6 +680,7 @@ module.exports.CreateDB = function (parent, func) {
|
|||||||
// Postgres SQL
|
// Postgres SQL
|
||||||
var connectinArgs = parent.args.postgres;
|
var connectinArgs = parent.args.postgres;
|
||||||
var dbname = (connectinArgs.database != null) ? connectinArgs.database : 'meshcentral';
|
var dbname = (connectinArgs.database != null) ? connectinArgs.database : 'meshcentral';
|
||||||
|
delete connectinArgs.database;
|
||||||
obj.databaseType = 6;
|
obj.databaseType = 6;
|
||||||
const pgtools = require('pgtools');
|
const pgtools = require('pgtools');
|
||||||
pgtools.createdb(connectinArgs, dbname, function (err, res) {
|
pgtools.createdb(connectinArgs, dbname, function (err, res) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user