File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
infrastructure/terraform/modules/backend-api
lambdas/backend-api/src/templates Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 11module "submit_routing_config_lambda" {
22 source = " https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.22/terraform-lambda.zip"
33
4+ system_log_level = " DEBUG"
5+ application_log_level = " FATAL"
6+
47 project = var. project
58 environment = var. environment
69 component = var. component
Original file line number Diff line number Diff line change @@ -123,3 +123,27 @@ export const uploadLetterFileRepositoryAndTemplateRepositoryContainer = () => ({
123123 ...uploadLetterFileRepositoryContainer ( ) ,
124124 logger,
125125} ) ;
126+
127+ export const submitRoutingConfigContainer = ( ) => {
128+ const config = loadConfig ( ) ;
129+
130+ const clientConfigRepository = new ClientConfigRepository (
131+ config . clientConfigSsmKeyPrefix ,
132+ ssmClient ,
133+ new NodeCache ( { stdTTL : config . clientConfigTtlSeconds } )
134+ ) ;
135+
136+ const routingConfigRepository = new RoutingConfigRepository (
137+ ddbDocClient ,
138+ config . routingConfigTableName
139+ ) ;
140+
141+ const routingConfigClient = new RoutingConfigClient (
142+ routingConfigRepository ,
143+ clientConfigRepository
144+ ) ;
145+
146+ return {
147+ routingConfigClient,
148+ } ;
149+ } ;
Original file line number Diff line number Diff line change 11import { createHandler } from './api/submit-routing-config' ;
2- import { createContainer } from './container' ;
2+ import { submitRoutingConfigContainer } from './container' ;
33
4- export const handler = createHandler ( createContainer ( ) ) ;
4+ export const handler = createHandler ( submitRoutingConfigContainer ( ) ) ;
You can’t perform that action at this time.
0 commit comments