badmfck-api-server 2.8.9 → 2.9.0

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.
@@ -89,7 +89,7 @@ async function Initializer(services) {
89
89
  exports.Initializer = Initializer;
90
90
  class APIService extends BaseService_1.BaseService {
91
91
  static nextLogID = 0;
92
- version = "2.8.9";
92
+ version = "2.9.0";
93
93
  options;
94
94
  monitor = null;
95
95
  monitorIndexFile;
@@ -236,7 +236,7 @@ class MysqlAdapter {
236
236
  }
237
237
  }
238
238
  catch (e) {
239
- (0, LogService_1.logCrit)("MysqlAdapter", `Error when executing query: ${e}`);
239
+ (0, LogService_1.logCrit)("MysqlAdapter", `Error when executing query: ${query}`, e);
240
240
  const error = {
241
241
  code: "EXEC_ERROR",
242
242
  errno: 100002,
@@ -341,7 +341,9 @@ class MysqlAdapter {
341
341
  if (value === null || value === undefined)
342
342
  return "NULL";
343
343
  if (!system && typeof value === "string")
344
- value = value.replaceAll('"', '\\"');
344
+ value = '"' + value.replaceAll('"', '\\"') + '"';
345
+ if (typeof value === "boolean")
346
+ value = value ? 1 : 0;
345
347
  field.__parsedValue = value;
346
348
  return value;
347
349
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "2.8.9",
3
+ "version": "2.9.0",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",