File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ async function get_bucket_notification(req) {
14
14
15
15
result = _ . cloneDeep ( result ) ;
16
16
17
+ const TopicConfiguration = [ ] ;
18
+
17
19
//adapt to aws cli structure
18
20
if ( result && result . length > 0 ) {
19
21
for ( const conf of result ) {
@@ -23,20 +25,20 @@ async function get_bucket_notification(req) {
23
25
delete conf . event ;
24
26
delete conf . topic ;
25
27
delete conf . id ;
28
+
29
+ TopicConfiguration . push ( { TopicConfiguration : conf } ) ;
26
30
}
27
31
}
28
32
29
33
const reply = result && result . length > 0 ?
30
34
{
31
35
//return result inside TopicConfiguration tag
32
- NotificationConfiguration : {
33
- TopicConfiguration : result
34
- }
36
+ NotificationConfiguration :
37
+ TopicConfiguration
35
38
} :
36
39
//if there's no notification, return empty NotificationConfiguration tag
37
40
{ NotificationConfiguration : { } } ;
38
41
39
-
40
42
return reply ;
41
43
}
42
44
You can’t perform that action at this time.
0 commit comments