Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
martinj committed Feb 20, 2017
1 parent bec034b commit 5c832e1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function dispatchToHandler(handlers, req, reply, payload) {
function confirmSubscription(sns, topicOpts, req, reply, payload) {
return request
.get(payload.SubscribeURL)
.then((res) => {
.then(() => {
req.log(['hookido', 'info'], `SNS subscription confirmed for ${payload.TopicArn}`);
reply().code(200);

Expand Down
2 changes: 1 addition & 1 deletion lib/sns.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class SNS {
return resolve(data);
}

validator.validate(data, (err, message) => {
validator.validate(data, (err) => {
if (err) {
return reject(err);
}
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@
}
},
"dependencies": {
"aws-sdk": "^2.6.10",
"bluebird": "^3.4.6",
"aws-sdk": "^2.16.0",
"bluebird": "^3.4.7",
"hoek": "^4.1.0",
"joi": "^9.2.0",
"joi": "^10.2.2",
"request-prom": "^3.1.0",
"sns-validator": "^0.2.1"
},
"devDependencies": {
"@aptoma/eslint-config": "^4.0.0",
"@aptoma/eslint-config": "^6.0.0",
"chai": "3.5.0",
"eslint": "^3.8.1",
"hapi": "^15.1.1",
"eslint": "^3.15.0",
"hapi": "^16.1.0",
"istanbul": "^0.4.2",
"mocha": "^3.1.2",
"mocha": "^3.2.0",
"mocha-only-detector": "^0.1.0",
"nock": "^8.1.0",
"release-it": "^2.3.1"
"nock": "^9.0.6",
"release-it": "^2.5.4"
}
}
10 changes: 5 additions & 5 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('Hookido Hapi Plugin', () => {
return done(err);
}

server.plugins.hookido.snsInstances[0].findSubscriptionArn = (arn, protocol, endpoint) => {
server.plugins.hookido.snsInstances[0].findSubscriptionArn = () => {
return Promise.resolve('foo');
};

Expand Down Expand Up @@ -100,7 +100,7 @@ describe('Hookido Hapi Plugin', () => {
return done(err);
}

server.plugins.hookido.snsInstances[0].findSubscriptionArn = (arn, protocol, endpoint) => {
server.plugins.hookido.snsInstances[0].findSubscriptionArn = () => {
const err = new Error();
err.code = 'NOT_FOUND';
return Promise.reject(err);
Expand Down Expand Up @@ -150,7 +150,7 @@ describe('Hookido Hapi Plugin', () => {
return done(err);
}

server.plugins.hookido.snsInstances[0].findSubscriptionArn = (arn, protocol, endpoint) => {
server.plugins.hookido.snsInstances[0].findSubscriptionArn = () => {
const err = new Error();
err.code = 'PENDING';
return Promise.reject(err);
Expand Down Expand Up @@ -232,7 +232,7 @@ describe('Hookido Hapi Plugin', () => {
options: {
skipPayloadValidation: true,
handlers: {
notification: (req, reply, payload) => {
notification: (req, reply) => {
reply({called: true});
}
}
Expand Down Expand Up @@ -263,7 +263,7 @@ describe('Hookido Hapi Plugin', () => {
skipPayloadValidation: true,
handlers: {
notification() {},
subscriptionconfirmation: (req, reply, payload) => {
subscriptionconfirmation: (req, reply) => {
reply({called: true});
}
}
Expand Down

0 comments on commit 5c832e1

Please sign in to comment.