File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -268,20 +268,13 @@ class Scf {
268268 if ( eventType === 'apigw' ) {
269269 const thisTrigger = inputs . events [ i ] [ 'apigw' ] [ 'parameters' ] ;
270270 thisTrigger . region = this . region ;
271- const endpoints = [ ] ;
272- thisTrigger . endpoints . forEach ( ( endpoint ) => {
273- if ( endpoint . function ) {
274- endpoint . function [ 'functionName' ] = funcInfo . FunctionName ;
275- } else {
276- endpoint [ 'function' ] = {
277- functionName : funcInfo . FunctionName ,
278- functionNamespace : funcInfo . Namespace ,
279- } ;
280- }
281- endpoints . push ( endpoint ) ;
282- } ) ;
283271 thisTrigger . serviceName = thisTrigger . serviceName || inputs . events [ i ] [ 'apigw' ] [ 'name' ] ;
284- thisTrigger . endpoints = endpoints ;
272+ thisTrigger . endpoints = thisTrigger . endpoints . map ( ( endpoint ) => {
273+ endpoint . function = endpoint . function || { } ;
274+ endpoint . function . functionName = funcInfo . FunctionName ;
275+ endpoint . function . functionNamespace = funcInfo . Namespace ;
276+ return endpoint ;
277+ } ) ;
285278 try {
286279 deployThisTriggerResult = await this . apigwClient . deploy ( thisTrigger ) ;
287280 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments