Skip to content

Commit 1b2cf9d

Browse files
committed
fix: read bucket and object from srcOriginal
1 parent 7c5fbe1 commit 1b2cf9d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

example/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<body>
1616
<h1>
1717
Welcome to Express.js application created by
18-
<a href="https://serverlesscloud.cn/">Serververless Framework.</a>
18+
<a href="https://serverlesscloud.cn/">Serverless Framework.</a>
1919
</h1>
2020
</body>
2121
</html>

src/utils.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,11 @@ const prepareInputs = async (instance, credentials, inputs = {}) => {
149149
const stateServiceId = instance.state[regionList[0]] && instance.state[regionList[0]].serviceId
150150

151151
const functionConf = {
152-
code:
153-
typeof inputs.src === 'object'
154-
? inputs.src
155-
: {
156-
src: inputs.src
157-
},
152+
code: {
153+
src: inputs.src,
154+
bucket: inputs.srcOriginal && inputs.srcOriginal.bucket,
155+
object: inputs.srcOriginal && inputs.srcOriginal.object
156+
},
158157
name:
159158
ensureString(inputs.functionName, { isOptional: true }) ||
160159
stateFunctionName ||

0 commit comments

Comments
 (0)