abler-api 1.0.12 → 1.0.14
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/dist/cjs/pp-util.js +9 -8
- package/package.json +7 -7
package/dist/cjs/pp-util.js
CHANGED
|
@@ -1160,14 +1160,13 @@ class apiUtil$2 {
|
|
|
1160
1160
|
* @param token
|
|
1161
1161
|
* @returns {*}
|
|
1162
1162
|
*/
|
|
1163
|
-
static tokenDataExist(token) {
|
|
1164
|
-
return kvStorage.stored(token);
|
|
1163
|
+
static async tokenDataExist(token) {
|
|
1164
|
+
return await kvStorage.stored(token);
|
|
1165
1165
|
}
|
|
1166
|
-
static
|
|
1166
|
+
static checkParametersOK(params, ...args) {
|
|
1167
1167
|
configNeeded();
|
|
1168
1168
|
let paramSufix = params._param_sufix || "";
|
|
1169
|
-
for (let
|
|
1170
|
-
let paramName = arguments[i];
|
|
1169
|
+
for (let paramName of args) {
|
|
1171
1170
|
let paramExists = false;
|
|
1172
1171
|
if (paramName.includes("/")) {
|
|
1173
1172
|
let names = paramName.split("/");
|
|
@@ -1195,11 +1194,13 @@ class apiUtil$2 {
|
|
|
1195
1194
|
} else {
|
|
1196
1195
|
paramExists = typeof params[paramName] != 'undefined' || typeof params[paramName + paramSufix] != 'undefined';
|
|
1197
1196
|
}
|
|
1198
|
-
if (!paramExists)
|
|
1197
|
+
if (!paramExists) throw errCfg.ERROR(errCfg.PARAMETER_NEEDED, paramName);
|
|
1199
1198
|
}
|
|
1200
|
-
return
|
|
1199
|
+
return paramSufix;
|
|
1200
|
+
}
|
|
1201
|
+
static async parametersOK(params) {
|
|
1202
|
+
return apiUtil$2.checkParametersOK(...arguments);
|
|
1201
1203
|
}
|
|
1202
|
-
|
|
1203
1204
|
/**
|
|
1204
1205
|
* 获取客户端IP地址
|
|
1205
1206
|
* @param req
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "abler-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "API服务相关工具",
|
|
5
5
|
"main": "./dist/cjs/pp-util.js",
|
|
6
6
|
"-module": "./dist/es/pp-util.js",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"author": "peng_peng",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"abler-db": "^1.0.
|
|
19
|
-
"abler-i18n": "^1.0.
|
|
20
|
-
"abler-messenger": "^1.0.
|
|
21
|
-
"abler-net": "^1.0.
|
|
22
|
-
"abler-util": "^1.0.
|
|
18
|
+
"abler-db": "^1.0.15",
|
|
19
|
+
"abler-i18n": "^1.0.2",
|
|
20
|
+
"abler-messenger": "^1.0.14",
|
|
21
|
+
"abler-net": "^1.0.4",
|
|
22
|
+
"abler-util": "^1.0.4",
|
|
23
23
|
"basic-auth": "^2.0.1",
|
|
24
24
|
"node-cron": "^3.0.1",
|
|
25
25
|
"q": "^1.5.1"
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"rollup-plugin-json": "^4.0.0",
|
|
43
43
|
"rollup-plugin-terser": "^7.0.2"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "0bddbc5bbe6f98ed8e6dca14fc589c44f29fec0d"
|
|
46
46
|
}
|