Skip to content

Commit f27ceaf

Browse files
author
Aleksander Dikanski
committed
Fix linting errors
1 parent 1764e1d commit f27ceaf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/stackops/apiGateway.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ module.exports = function(currentTemplate, aliasStackTemplates, currentAliasStac
225225
const authorizerType = _.get(authorizer, 'Properties.Type');
226226
if (authorizerType === 'TOKEN' || authorizerType === 'REQUEST') {
227227
const uriParts = authorizer.Properties.AuthorizerUri['Fn::Join'][1];
228-
if(_.every(uriParts, part => !_.startsWith(part, 'arn:aws:lambda'))) {
228+
const isExternalRefAuthorizer = _.every(uriParts, part => !_.startsWith(part, 'arn:aws:lambda'));
229+
if (isExternalRefAuthorizer) {
229230
const funcIndex = _.findIndex(uriParts, part =>
230231
_.has(part, 'Fn::GetAtt') || _.startsWith(part, 'arn:aws:lambda'));
231232

@@ -269,8 +270,7 @@ module.exports = function(currentTemplate, aliasStackTemplates, currentAliasStac
269270
const versionName = _.find(_.keys(versions), version => _.startsWith(version, functionName));
270271
const aliasName = _.find(_.keys(aliases), alias => _.startsWith(alias, functionName));
271272
const isExternalRef = _.startsWith(permission.Properties.FunctionName, 'arn:aws:lambda');
272-
273-
console.log('checking permission: ', name, JSON.stringify(permission), ' isExternalRef: ' + isExternalRef);
273+
274274
// Adjust references and alias permissions
275275
if (!isExternalRef) {
276276
permission.Properties.FunctionName = { Ref: aliasName };

0 commit comments

Comments
 (0)