File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
/* Copyright (C) 2016 NooBaa */
2
2
'use strict' ;
3
3
4
+ const _ = require ( 'lodash' ) ;
5
+
4
6
/**
5
7
* http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETnotification.html
6
8
*/
7
9
async function get_bucket_notification ( req ) {
8
10
9
- const result = await req . object_sdk . get_bucket_notification ( {
11
+ let result = await req . object_sdk . get_bucket_notification ( {
10
12
bucket_name : req . params . bucket ,
11
13
} ) ;
12
14
15
+ result = _ . cloneDeep ( result ) ;
16
+
13
17
//adapt to aws cli structure
14
18
if ( result && result . length > 0 ) {
15
19
for ( const conf of result ) {
16
20
conf . Event = conf . event ;
17
21
conf . Topic = conf . topic ;
18
22
conf . Id = conf . id ;
19
- delete conf . vent ;
23
+ delete conf . event ;
20
24
delete conf . topic ;
21
25
delete conf . id ;
22
26
}
You can’t perform that action at this time.
0 commit comments