@steedos/service-rest 2.7.27-beta.6 → 3.0.0-beta.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-rest",
3
- "version": "2.7.27-beta.6",
3
+ "version": "3.0.0-beta.8",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -16,9 +16,9 @@
16
16
  "repository": {},
17
17
  "license": "MIT",
18
18
  "dependencies": {
19
- "@steedos/objectql": "2.7.27-beta.6",
20
- "@steedos/service-object-mixin": "2.7.27-beta.6",
19
+ "@steedos/objectql": "3.0.0-beta.8",
20
+ "@steedos/service-object-mixin": "3.0.0-beta.8",
21
21
  "lodash": "^4.17.21"
22
22
  },
23
- "gitHead": "4cc6978a51be2b5b8efcad8ec8adba467df6e02a"
23
+ "gitHead": "723d92765db5342a374c7aacb5b835e69f77ca4b"
24
24
  }
@@ -1,8 +1,8 @@
1
1
  /*
2
2
  * @Author: sunhaolin@hotoa.com
3
3
  * @Date: 2023-03-23 15:12:14
4
- * @LastEditors: 孙浩林 sunhaolin@steedos.com
5
- * @LastEditTime: 2024-05-21 13:22:25
4
+ * @LastEditors: baozhoutao@steedos.com
5
+ * @LastEditTime: 2025-03-16 17:29:00
6
6
  * @Description:
7
7
  */
8
8
  "use strict";
@@ -534,6 +534,7 @@ module.exports = {
534
534
  const userSession = ctx.meta.user;
535
535
  const query = {}
536
536
  if (fields) {
537
+ console.log(`fields:`, fields)
537
538
  query.fields = JSON.parse(fields)
538
539
  }
539
540
  const doc = await this.findOne(objectName, id, query, userSession)
@@ -768,6 +769,7 @@ module.exports = {
768
769
 
769
770
  // 启用API(is_rest === true) 的函数才在这里执行
770
771
  // 从缓存获取
772
+ // eslint-disable-next-line no-undef
771
773
  const fDocs = await broker.call(`${METADATA_CACHER_SERVICE_NAME}.find`, {metadataName: 'object_functions', filters: [
772
774
  ["objectApiName", "=", objectName],
773
775
  ["_name", "=", functionApiName],
@@ -856,7 +858,6 @@ module.exports = {
856
858
  * Service started lifecycle event handler
857
859
  */
858
860
  async started() {
859
-
860
861
  },
861
862
 
862
863
  /**
package/translate.js CHANGED
@@ -231,7 +231,7 @@ async function translateRecordToUI(record, objectName, selectorFieldNames, userS
231
231
  } else if (fType == "summary") {
232
232
  displayObj[name] = formatBasicFieldValue(dataType, field, record[name], objConfig, userSession);
233
233
  } else if (fType == "image" || fType == "file" || fType === 'avatar') {
234
- const optionsStr = fType == "file" ? '?download=1' : ''
234
+ const optionsStr = fType == "file" ? '' : ''
235
235
  let fileValue = null;
236
236
  let value = record[name];
237
237
  if (!value) {