@steedos/service-rest 3.0.0-beta.99 → 3.0.1
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/package.json +4 -5
- package/package.service.js +0 -13
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-rest",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"main": "package.service.js",
|
|
5
|
-
"private": false,
|
|
6
5
|
"publishConfig": {
|
|
7
6
|
"access": "public"
|
|
8
7
|
},
|
|
@@ -16,9 +15,9 @@
|
|
|
16
15
|
"repository": {},
|
|
17
16
|
"license": "MIT",
|
|
18
17
|
"dependencies": {
|
|
19
|
-
"@steedos/objectql": "3.0.
|
|
20
|
-
"@steedos/service-object-mixin": "3.0.
|
|
18
|
+
"@steedos/objectql": "3.0.1",
|
|
19
|
+
"@steedos/service-object-mixin": "3.0.1",
|
|
21
20
|
"lodash": "^4.17.21"
|
|
22
21
|
},
|
|
23
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "4bbcc1f1ba098d299f5c363e67679f001f715575"
|
|
24
23
|
}
|
package/package.service.js
CHANGED
|
@@ -766,19 +766,6 @@ module.exports = {
|
|
|
766
766
|
const { objectName, functionApiName } = ctx.params;
|
|
767
767
|
const object = getObject(objectName)
|
|
768
768
|
|
|
769
|
-
// 启用API(is_rest === true) 的函数才在这里执行
|
|
770
|
-
// 从缓存获取
|
|
771
|
-
// eslint-disable-next-line no-undef
|
|
772
|
-
const fDocs = await broker.call(`${METADATA_CACHER_SERVICE_NAME}.find`, {metadataName: 'object_functions', filters: [
|
|
773
|
-
["objectApiName", "=", objectName],
|
|
774
|
-
["_name", "=", functionApiName],
|
|
775
|
-
["is_rest", "=", true]
|
|
776
|
-
]});
|
|
777
|
-
|
|
778
|
-
if (!fDocs || fDocs.length == 0) {
|
|
779
|
-
throw new Error(`function need to enable api access.`);
|
|
780
|
-
}
|
|
781
|
-
|
|
782
769
|
const result = await object.runFunction(functionApiName, ctx.params, userSession);
|
|
783
770
|
return {
|
|
784
771
|
"status": REQUEST_SUCCESS_STATUS,
|