diff --git a/bin/stacks/api-stack.ts b/bin/stacks/api-stack.ts index b6956a7..48a9d49 100644 --- a/bin/stacks/api-stack.ts +++ b/bin/stacks/api-stack.ts @@ -267,7 +267,7 @@ export class APIStack extends cdk.Stack { const hardQuoteLambda = new aws_lambda_nodejs.NodejsFunction(this, 'HardQuote', { role: lambdaRole, runtime: aws_lambda.Runtime.NODEJS_18_X, - entry: path.join(__dirname, '../../lib/handlers/index.ts'), + entry: path.join(__dirname, '../../lib/handlers/hard-quote/index.ts'), handler: 'hardQuoteHandler', vpc, vpcSubnets: { diff --git a/lib/handlers/hard-quote/index.ts b/lib/handlers/hard-quote/index.ts index a60e1b1..c0e7e05 100644 --- a/lib/handlers/hard-quote/index.ts +++ b/lib/handlers/hard-quote/index.ts @@ -1,3 +1,12 @@ +import { QuoteHandler } from './handler'; +import { QuoteInjector } from './injector'; export { QuoteHandler as HardQuoteHandler } from './handler'; -export { ContainerInjected, QuoteInjector as HardQuoteInjector, RequestInjected } from './injector'; +export { RequestInjected, ContainerInjected, QuoteInjector as HardQuoteInjector } from './injector'; export * from './schema'; + +const hardQuoteInjectorPromise = new QuoteInjector('hardQuoteInjector').build(); +const hardQuoteHandler = new QuoteHandler('hardQuoteHandler', hardQuoteInjectorPromise); + +module.exports = { + hardQuoteHandler: hardQuoteHandler.handler, +}; diff --git a/lib/handlers/index.ts b/lib/handlers/index.ts index ba59ab1..2b251cc 100644 --- a/lib/handlers/index.ts +++ b/lib/handlers/index.ts @@ -4,7 +4,6 @@ import { postOrderProcessor, quoteProcessor, } from './blueprints/cw-log-firehose-processor'; -import { HardQuoteHandler, HardQuoteInjector } from './hard-quote'; import { RfqHandler, RfqInjector } from './integration/rfq'; import { MockQuoteInjector, QuoteHandler, QuoteInjector } from './quote'; import { SwitchHandler, SwitchInjector } from './synth-switch'; @@ -12,9 +11,6 @@ import { SwitchHandler, SwitchInjector } from './synth-switch'; const quoteInjectorPromise = new QuoteInjector('quoteInjector').build(); const quoteHandler = new QuoteHandler('quoteHandler', quoteInjectorPromise); -const hardQuoteInjectorPromise = new HardQuoteInjector('hardQuoteInjector').build(); -const hardQuoteHandler = new HardQuoteHandler('hardQuoteHandler', hardQuoteInjectorPromise); - const switchInjectorPromise = new SwitchInjector('switchInjector').build(); const switchHandler = new SwitchHandler('SwitchHandler', switchInjectorPromise); @@ -30,7 +26,6 @@ module.exports = { quoteProcessor: quoteProcessor, botOrderEventsProcessor: botOrderEventsProcessor, quoteHandler: quoteHandler.handler, - hardQuoteHandler: hardQuoteHandler.handler, mockQuoteHandler: mockQuoteHandler.handler, rfqHandler: rfqHandler.handler, switchHandler: switchHandler.handler,