badmfck-api-server 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,11 +23,13 @@ class MysqlService extends BaseService_1.BaseService {
|
|
23
23
|
super("mysql");
|
24
24
|
this.options = options;
|
25
25
|
if (this.options.host.startsWith("_"))
|
26
|
-
this.options.host = decrypt(this.options.host) ?? this.options.host;
|
26
|
+
this.options.host = decrypt(this.options.host.substring(1)) ?? this.options.host;
|
27
27
|
if (this.options.user.startsWith("_"))
|
28
|
-
this.options.user = decrypt(this.options.user) ?? this.options.user;
|
28
|
+
this.options.user = decrypt(this.options.user.substring(1)) ?? this.options.user;
|
29
29
|
if (this.options.database.startsWith("_"))
|
30
|
-
this.options.database = decrypt(this.options.database) ?? this.options.database;
|
30
|
+
this.options.database = decrypt(this.options.database.substring(1)) ?? this.options.database;
|
31
|
+
if (this.options.password.startsWith("_"))
|
32
|
+
this.options.password = decrypt(this.options.password.substring(1)) ?? this.options.password;
|
31
33
|
}
|
32
34
|
static async executeQuery(query) { return await exports.REQ_MYSQL_QUERY.request(query); }
|
33
35
|
async init() {
|
@@ -46,7 +48,7 @@ class MysqlService extends BaseService_1.BaseService {
|
|
46
48
|
}
|
47
49
|
async recreatePool() {
|
48
50
|
if (this.options.onLog)
|
49
|
-
this.options.onLog(
|
51
|
+
this.options.onLog(1, "Mysql server trying to create pool");
|
50
52
|
this.serviceStarted = false;
|
51
53
|
const ok = await this.createPool();
|
52
54
|
if (!ok) {
|
@@ -254,7 +256,7 @@ class MysqlService extends BaseService_1.BaseService {
|
|
254
256
|
}
|
255
257
|
async createPool() {
|
256
258
|
if (this.options.onLog)
|
257
|
-
this.options.onLog(1, "Connecting to mysql: \n HOST: " + this.options.host + '\n
|
259
|
+
this.options.onLog(1, "Connecting to mysql: \n HOST: " + this.options.host + '\n PORT:' + this.options.port);
|
258
260
|
let err = false;
|
259
261
|
if (this.pool) {
|
260
262
|
try {
|