Skip to content

Commit

Permalink
fix: added condition to authorizer on api route (#11430)
Browse files Browse the repository at this point in the history
Co-authored-by: Pete Littlewood <[email protected]>
  • Loading branch information
bashleigh and plittlewood-rpt authored Sep 2, 2024
1 parent e83d3af commit 7edc80c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/deployment-service/cdk/lib/cdk-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,14 @@ export const createStack = async () => {
if (options.queues) {
options.queues.forEach((queue) => addLambdaSQSTrigger(lambda, queue as Queue))
} else if (options.api) {
addLambdaToApi(stack, api, lambda, options.api.routes, config.CONNECT_USER_POOL, undefined)
addLambdaToApi(
stack,
api,
lambda,
options.api.routes,
options.api.authorizer ? config.CONNECT_USER_POOL : undefined,
undefined,
)
} else if (options.topic) {
addLambdaSNSTrigger(lambda, options.topic)
}
Expand Down

0 comments on commit 7edc80c

Please sign in to comment.