diff --git a/src/endpoint/s3/ops/s3_get_bucket_notification.js b/src/endpoint/s3/ops/s3_get_bucket_notification.js index b5a2d9c021..5106ce91ff 100644 --- a/src/endpoint/s3/ops/s3_get_bucket_notification.js +++ b/src/endpoint/s3/ops/s3_get_bucket_notification.js @@ -1,22 +1,26 @@ /* Copyright (C) 2016 NooBaa */ 'use strict'; +const _ = require('lodash'); + /** * http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETnotification.html */ async function get_bucket_notification(req) { - const result = await req.object_sdk.get_bucket_notification({ + let result = await req.object_sdk.get_bucket_notification({ bucket_name: req.params.bucket, }); + result = _.cloneDeep(result); + //adapt to aws cli structure if (result && result.length > 0) { for (const conf of result) { conf.Event = conf.event; conf.Topic = conf.topic; conf.Id = conf.id; - delete conf.vent; + delete conf.event; delete conf.topic; delete conf.id; }