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.
- package/dk_modules/users.js +2 -3
- package/main.js +1 -1
- package/package.json +1 -1
package/dk_modules/users.js
CHANGED
|
@@ -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
|
|
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) {
|