Skip to content

Commit

Permalink
Merge pull request #285 from balancer/lambda-test
Browse files Browse the repository at this point in the history
adding test lambda
  • Loading branch information
gmbronco authored Jun 26, 2024
2 parents 9cf6d85 + 04e30bc commit 77535f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down
6 changes: 6 additions & 0 deletions src/lambdas/test-function.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const handler = async () => {
return {
statusCode: 200,
body: 'OK',
};
};

0 comments on commit 77535f6

Please sign in to comment.