File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -79,13 +79,13 @@ module.exports = {
7979 } ) ;
8080 }
8181 if ( "nats" in event ) {
82- this . createMessageTrigger ( application . id , {
82+ this . createMessageTrigger ( application . id , isFunction , {
8383 name : event . nats . name ,
8484 scw_nats_config : event . nats . scw_nats_config ,
8585 } ) ;
8686 }
8787 if ( "sqs" in event ) {
88- this . createMessageTrigger ( application . id , {
88+ this . createMessageTrigger ( application . id , isFunction , {
8989 name : event . sqs . name ,
9090 scw_sqs_config : {
9191 queue : event . sqs . queue ,
Original file line number Diff line number Diff line change @@ -45,12 +45,18 @@ module.exports = {
4545 . catch ( manageError ) ;
4646 } ,
4747
48- createMessageTrigger ( applicationId , params ) {
48+ createMessageTrigger ( applicationId , isFunction , params ) {
4949 let payload = {
5050 ...params ,
5151 function_id : applicationId ,
5252 } ;
5353
54+ if ( ! isFunction ) {
55+ payload = {
56+ ...params ,
57+ container_id : applicationId ,
58+ } ;
59+ }
5460 return this . apiManager
5561 . post ( "triggers" , payload )
5662 . then ( ( response ) => response . data )
You can’t perform that action at this time.
0 commit comments