@steedos/service-rest 3.0.0-beta.99 → 3.0.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.
Files changed (2) hide show
  1. package/package.json +4 -5
  2. 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.0-beta.99",
3
+ "version": "3.0.0",
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.0-beta.99",
20
- "@steedos/service-object-mixin": "3.0.0-beta.99",
18
+ "@steedos/objectql": "3.0.0",
19
+ "@steedos/service-object-mixin": "3.0.0",
21
20
  "lodash": "^4.17.21"
22
21
  },
23
- "gitHead": "a0e9d5ee78766e54048a385b7677f6916aa287c4"
22
+ "gitHead": "20ea485d800dd4ad0a99c82b26000879c2f85741"
24
23
  }
@@ -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,