mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-03-04 08:25:57 +00:00
Fix errors
This commit is contained in:
parent
6ffa4b707b
commit
6a2e5202e2
1 changed files with 3 additions and 3 deletions
|
@ -232,7 +232,7 @@ class Database {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} else if (dbConfig.type === "mariadb") {
|
} else if (dbConfig.type === "mariadb") {
|
||||||
validateDBName(dbConfig.dbName);
|
this.validateDBName(dbConfig.dbName);
|
||||||
|
|
||||||
const connection = await mysql.createConnection({
|
const connection = await mysql.createConnection({
|
||||||
host: dbConfig.hostname,
|
host: dbConfig.hostname,
|
||||||
|
@ -270,7 +270,7 @@ class Database {
|
||||||
pool: mariadbPoolConfig,
|
pool: mariadbPoolConfig,
|
||||||
};
|
};
|
||||||
} else if (dbConfig.type === "postgres") {
|
} else if (dbConfig.type === "postgres") {
|
||||||
validateDBName(dbConfig.dbName);
|
this.validateDBName(dbConfig.dbName);
|
||||||
|
|
||||||
const clientConfig = {
|
const clientConfig = {
|
||||||
host: dbConfig.hostname,
|
host: dbConfig.hostname,
|
||||||
|
@ -280,7 +280,7 @@ class Database {
|
||||||
database: dbConfig.dbName,
|
database: dbConfig.dbName,
|
||||||
};
|
};
|
||||||
const client = new pg.Client(clientConfig);
|
const client = new pg.Client(clientConfig);
|
||||||
await connection.execute("CREATE DATABASE IF NOT EXISTS " + dbConfig.dbName);
|
await client.execute("CREATE DATABASE IF NOT EXISTS " + dbConfig.dbName);
|
||||||
await client.end();
|
await client.end();
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue