Skip to content

Commit 78f68a2

Browse files
authored
Merge pull request #63 from ModusCreateOrg/ADE-174-apigateway
Add POST /api/reports to the API Gateway
2 parents 2af29d9 + cc4f111 commit 78f68a2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

backend/src/iac/backend-stack.ts

+8
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,13 @@ export class BackendStack extends cdk.Stack {
393393
options: integrationOptions,
394394
});
395395

396+
const createReportIntegration = new apigateway.Integration({
397+
type: apigateway.IntegrationType.HTTP_PROXY,
398+
integrationHttpMethod: 'POST',
399+
uri: `${serviceUrl}/api/reports`,
400+
options: integrationOptions,
401+
});
402+
396403
const getLatestReportIntegration = new apigateway.Integration({
397404
type: apigateway.IntegrationType.HTTP_PROXY,
398405
integrationHttpMethod: 'GET',
@@ -432,6 +439,7 @@ export class BackendStack extends cdk.Stack {
432439

433440
// Add methods to the resources
434441
reportsResource.addMethod('GET', getReportsIntegration, methodOptions);
442+
reportsResource.addMethod('POST', createReportIntegration, methodOptions);
435443
latestResource.addMethod('GET', getLatestReportIntegration, methodOptions);
436444
docsResource.addMethod('GET', getDocsIntegration, methodOptions);
437445
// For path parameter methods, add the request parameter configuration

0 commit comments

Comments
 (0)