Skip to content

Commit

Permalink
fixes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlindenberg committed Jul 29, 2016
1 parent ba09780 commit 1619a6f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
32 changes: 18 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,24 @@ module.exports = function(S) {
FunctionName: functionName,
StatementId: statementId
},
function() {
_this.lambda.addPermission({
FunctionName: functionName,
StatementId: statementId,
Action: 'lambda:InvokeFunction',
Principal: 'sns.amazonaws.com',
SourceArn: topicArn,
}, function callback(err, data) {
if (err) {
reject(err);
} else {
resolve(data);
}
});
function (err, data) {
if (err) {
reject(err);
} else {
_this.lambda.addPermission({
FunctionName: functionName,
StatementId: statementId,
Action: 'lambda:InvokeFunction',
Principal: 'sns.amazonaws.com',
SourceArn: topicArn,
}, function callback(err, data) {
if (err) {
reject(err);
} else {
resolve(data);
}
});
}
}
);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-plugin-sns",
"version": "0.5.9",
"version": "0.5.10",
"engines": {
"node": ">=4.0"
},
Expand Down

0 comments on commit 1619a6f

Please sign in to comment.