Skip to content

Commit 4185a33

Browse files
committed
fix: apigatewyConf not set, Close #13,#14
1 parent ef514ae commit 4185a33

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

serverless.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ class TencentExpress extends Component {
2424
inputs.region = ensureString(inputs.region, { default: 'ap-guangzhou' })
2525
inputs.include = ensureIterable(inputs.include, { default: [], ensureItem: ensureString })
2626
inputs.exclude = ensureIterable(inputs.exclude, { default: [], ensureItem: ensureString })
27+
inputs.apigatewayConf = ensureIterable(inputs.apigatewayConf, {
28+
default: {},
29+
ensureItem: ensurePlainObject
30+
})
2731

2832
const appFile = path.resolve(inputs.codeUri, 'app.js')
2933
if (!(await utils.fileExists(appFile))) {
@@ -58,6 +62,7 @@ class TencentExpress extends Component {
5862
functionName: inputs.name
5963
}
6064

65+
// only user set apigatewayConf.isDisabled to `true`, do not create api
6166
if (!inputs.apigatewayConf.isDisabled) {
6267
const tencentApiGateway = await this.load('@serverless/tencent-apigateway')
6368
const apigwParam = {

0 commit comments

Comments
 (0)