@byted-apaas/server-sdk-node 1.1.14-beta.2 → 1.1.14-beta.3
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 +1 -1
- package/request/openapi.js +5 -8
package/package.json
CHANGED
package/request/openapi.js
CHANGED
|
@@ -11,6 +11,7 @@ const constants_3 = require("@byted-apaas/server-common-node/constants/constants
|
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
const utils_1 = require("@byted-apaas/server-common-node/utils/utils");
|
|
13
13
|
const permissionUtils = require("@byted-apaas/server-common-node/utils/permissionUtils");
|
|
14
|
+
const { URLSearchParams } = require('url');
|
|
14
15
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
15
16
|
const nodeCls = require('node-cls'); //nolint:byted_s_ts_no_require_imports
|
|
16
17
|
const fs = require('fs');
|
|
@@ -977,18 +978,14 @@ class RequestHttp {
|
|
|
977
978
|
let options = commonHttp.getOptions(null, constants_2.openapiHttpPath.getApprovalInstance);
|
|
978
979
|
let urlPath = options._reqPath.replace(replaceKeys.id, String(params.approvalInstanceId));
|
|
979
980
|
// 设置参数
|
|
980
|
-
const searchParams =
|
|
981
|
-
includes: "",
|
|
982
|
-
};
|
|
983
|
-
const includes = [];
|
|
981
|
+
const searchParams = new URLSearchParams();
|
|
984
982
|
if (params && params.includeContent) {
|
|
985
|
-
|
|
983
|
+
searchParams.append('includes', 'ApprovalComment_Content');
|
|
986
984
|
}
|
|
987
985
|
if (params && params.includeFormData) {
|
|
988
|
-
|
|
986
|
+
searchParams.append('includes', 'ApprovalTask_FormData');
|
|
989
987
|
}
|
|
990
|
-
|
|
991
|
-
options.searchParams = searchParams;
|
|
988
|
+
urlPath = urlPath + '?' + searchParams.toString();
|
|
992
989
|
// 发起请求
|
|
993
990
|
let resp = await openapi.doRequest(null, urlPath, options);
|
|
994
991
|
if (!resp || !resp.approval_instance) {
|