mdkcontroller 1.6.1 → 1.6.3

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.
@@ -65,15 +65,14 @@ export default (router, db) => {
65
65
  body: JSON.stringify({
66
66
  username: bodyParser.username,
67
67
  appname: bodyParser.appname || "web " + req.headers.host,
68
- number: bodyParser.number
68
+ number: `${bodyParser.number || "55"}`
69
69
  })
70
70
  }).then(async response => {
71
+ const text = await response.text();
71
72
  if (response.ok) {
72
- const text = await response.text();
73
73
  const data = JSON.parse(text);
74
74
  return data;
75
75
  }
76
- const text = await response.text();
77
76
  return { success: false, message: `${response.status}-${text}` };
78
77
  })
79
78
  .then(data => {
package/main.js CHANGED
@@ -109,7 +109,7 @@ export default async function (appname, cfgHandler = {}) {
109
109
  });
110
110
 
111
111
  app.use((req, res, next) => {
112
- const resultValidate = auth.validateBool(req, res, next);
112
+ const resultValidate = auth.validateBool(req, res);
113
113
  switch (resultValidate) {
114
114
  case 1:
115
115
  if (req.path.toLowerCase().indexOf("/cores/login/") >= 0) {
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "node-cache": "^5.1.2"
10
10
  },
11
11
  "name": "mdkcontroller",
12
- "version": "1.6.1",
12
+ "version": "1.6.3",
13
13
  "keywords": [],
14
14
  "author": "KHANHNBD <khanh272421@gmail.com>",
15
15
  "license": "ISC",