Skip to content

Commit

Permalink
minor tweaks with code
Browse files Browse the repository at this point in the history
  • Loading branch information
SachinShekhar committed May 10, 2020
1 parent 8c75987 commit 0807f61
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,16 +350,9 @@ export class GraphQLApi extends Construct {

if (
defaultAuthorizationType === AuthorizationType.API_KEY ||
props.authorizationConfig?.additionalAuthorizationModes?.reduce<boolean>(
(acc, authMode) =>
acc === false &&
authMode.authorizationType === AuthorizationType.API_KEY
? true
: acc === true
? true
: false,
false
)
props.authorizationConfig?.additionalAuthorizationModes?.findIndex(
(authMode) => authMode.authorizationType === AuthorizationType.API_KEY
) !== -1
) {
const apiKeyConfig: ApiKeyConfig = props.authorizationConfig
?.defaultAuthorization?.apiKeyConfig || {
Expand Down

0 comments on commit 0807f61

Please sign in to comment.