mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-02-21 11:05:56 +00:00
Fix always true if condition
This commit is contained in:
parent
d2b48a648f
commit
98ba019cf0
2 changed files with 2 additions and 4 deletions
|
@ -263,7 +263,7 @@ class Database {
|
|||
|
||||
let sslConfig = null;
|
||||
let serverCa = undefined;
|
||||
if (mariaDbUseSSL) {
|
||||
if (mariaDbUseSSL === true) {
|
||||
serverCa = [ fs.readFileSync(mariaDbSslCert, "utf8") ];
|
||||
sslConfig = {
|
||||
rejectUnauthorized: true,
|
||||
|
|
|
@ -207,19 +207,17 @@ class SetupDatabase {
|
|||
this.runningSetup = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Test connection
|
||||
try {
|
||||
let sslConfig = null;
|
||||
let serverCa = undefined;
|
||||
if (mariaDbUseSSL) {
|
||||
if (mariaDbUseSSL === true) {
|
||||
serverCa = [ fs.readFileSync(mariaDbSslCert, "utf8") ];
|
||||
sslConfig = {
|
||||
rejectUnauthorized: true,
|
||||
ca: serverCa
|
||||
};
|
||||
}
|
||||
|
||||
const connection = await mysql.createConnection({
|
||||
host: dbConfig.hostname,
|
||||
port: dbConfig.port,
|
||||
|
|
Loading…
Add table
Reference in a new issue