Skip to content

Commit 8a7de74

Browse files
Fixes for liniting.
1 parent 0ecd9a7 commit 8a7de74

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

lib/package/sns/compileMethodsToSns.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ module.exports = {
6262
RequestTemplates: this.getSnsIntegrationRequestTemplates(http)
6363
}
6464

65-
if ("request" in http){
66-
if ("passThrough" in http.request){
65+
if ('request' in http) {
66+
if ('passThrough' in http.request) {
6767
integration.PassthroughBehavior = http.request.passThrough
6868
}
69-
if ("contentHandling" in http.request){
69+
if ('contentHandling' in http.request) {
7070
integration.ContentHandling = http.request.contentHandling
7171
}
7272
}
@@ -155,14 +155,6 @@ module.exports = {
155155
}
156156
},
157157

158-
getSnsIntegrationRequestPassThrough(http, integration) {
159-
if ("request" in http) {
160-
161-
}
162-
const defaultRequestTemplates = this.getDefaultSnsRequestTemplates(http)
163-
return Object.assign(defaultRequestTemplates, _.get(http, ['request', 'template']))
164-
},
165-
166158
buildDefaultSnsRequestTemplate(http) {
167159
const { topicName } = http
168160

lib/package/sns/compileMethodsToSns.test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ describe('#compileMethodsToSns()', () => {
477477
)
478478
expect(
479479
resource.Properties.Integration.RequestTemplates['application/x-www-form-urlencoded'][
480-
'Fn::Join'
480+
'Fn::Join'
481481
]
482482
).to.be.deep.equal([
483483
'',
@@ -1016,7 +1016,6 @@ describe('#compileMethodsToSns()', () => {
10161016
request: {
10171017
passThrough: 'WHEN_NO_TEMPLATES'
10181018
}
1019-
10201019
}
10211020
}
10221021
]
@@ -1031,7 +1030,6 @@ describe('#compileMethodsToSns()', () => {
10311030

10321031
serverlessApigatewayServiceProxy.compileMethodsToSns()
10331032

1034-
10351033
it('should create corresponding resources when sns proxies are given a passThought option', () => {
10361034
serverlessApigatewayServiceProxy.validated = {
10371035
events: [
@@ -1060,7 +1058,6 @@ describe('#compileMethodsToSns()', () => {
10601058
}
10611059

10621060
serverlessApigatewayServiceProxy.compileMethodsToSns()
1063-
console.log(serverless.service.provider.compiledCloudFormationTemplate.Resources)
10641061
expect(serverless.service.provider.compiledCloudFormationTemplate.Resources).to.deep.equal({
10651062
ApiGatewayMethodSnsPost: {
10661063
Type: 'AWS::ApiGateway::Method',
@@ -1177,7 +1174,6 @@ describe('#compileMethodsToSns()', () => {
11771174
}
11781175

11791176
serverlessApigatewayServiceProxy.compileMethodsToSns()
1180-
console.log(serverless.service.provider.compiledCloudFormationTemplate.Resources)
11811177
expect(serverless.service.provider.compiledCloudFormationTemplate.Resources).to.deep.equal({
11821178
ApiGatewayMethodSnsPost: {
11831179
Type: 'AWS::ApiGateway::Method',

0 commit comments

Comments
 (0)