@byted-apaas/server-sdk-node 1.0.1 → 1.0.2
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.
|
@@ -44,7 +44,7 @@ class KObject {
|
|
|
44
44
|
}
|
|
45
45
|
async getFields() {
|
|
46
46
|
let res = await Request.GetInstance().getFields(this.objectApiName);
|
|
47
|
-
return fields.parseFields(res
|
|
47
|
+
return fields.parseFields(res);
|
|
48
48
|
}
|
|
49
49
|
async getField(fieldApiName) {
|
|
50
50
|
let res = await Request.GetInstance().getField(this.objectApiName, fieldApiName);
|
package/package.json
CHANGED
package/request/innerapi.js
CHANGED
|
@@ -637,12 +637,14 @@ async function getFields(objectApiName) {
|
|
|
637
637
|
}
|
|
638
638
|
// 4.后置处理
|
|
639
639
|
post(resp.BaseResp);
|
|
640
|
+
let result = {};
|
|
640
641
|
try {
|
|
641
|
-
|
|
642
|
+
result = JSON.parse(resp.Data);
|
|
642
643
|
}
|
|
643
644
|
catch (e) {
|
|
644
645
|
throw new exceptions.InternalError(`JSON parse failed: ${e.message}`);
|
|
645
646
|
}
|
|
647
|
+
return result ? result.fields : [];
|
|
646
648
|
}
|
|
647
649
|
async function getField(objectApiName, fieldApiName) {
|
|
648
650
|
// 1. prepare request
|