Skip to content

Commit

Permalink
Merge pull request serverless#127 from kaihendry/better-callback
Browse files Browse the repository at this point in the history
Better callback as proposed in https://github.com/serverless/examples…
  • Loading branch information
christophgysin authored Apr 3, 2017
2 parents 1d07f3e + 25f6c12 commit 2e76673
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions aws-node-fetch-file-and-store-in-s3/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,5 @@ module.exports.save = (event, context, callback) => {
Body: buffer,
}).promise()
))
.then(() => {
callback(null, 'Saved');
})
.catch((error) => {
callback(error, null);
});
.then(v => callback(null, v), callback);
};

0 comments on commit 2e76673

Please sign in to comment.