From 04e30bc387ce22e871742a54de151f327d6a27ad Mon Sep 17 00:00:00 2001 From: gmbronco <83549293+gmbronco@users.noreply.github.com> Date: Wed, 26 Jun 2024 21:28:25 +0200 Subject: [PATCH] adding test lambda --- index.ts | 7 +++++++ src/lambdas/test-function.ts | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 src/lambdas/test-function.ts diff --git a/index.ts b/index.ts index ff216c6..585adb8 100644 --- a/index.ts +++ b/index.ts @@ -604,6 +604,13 @@ export class BalancerPoolsAPI extends Stack { updatePrices.addMethod('POST', updateTokenPricesIntegration); addCorsOptions(updatePrices); + const test = api.root.addResource('test'); + const testFunction = new NodejsFunction(this, 'testFunction', { + entry: join(__dirname, 'src', 'lambdas', 'test-function.ts'), + ...nodeJsFunctionProps, + }); + test.addMethod('GET', new LambdaIntegration(testFunction)); + const sor = api.root.addResource('sor'); const sorOnChain = sor.addResource('{chainId}'); sorOnChain.addMethod('POST', runSORIntegration, { diff --git a/src/lambdas/test-function.ts b/src/lambdas/test-function.ts new file mode 100644 index 0000000..a91f050 --- /dev/null +++ b/src/lambdas/test-function.ts @@ -0,0 +1,6 @@ +export const handler = async () => { + return { + statusCode: 200, + body: 'OK', + }; +};