Skip to content

Commit b28ae02

Browse files
committed
Add HTTP proxy integration for file processing and POST method to reports resource
1 parent b219f83 commit b28ae02

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

backend/src/iac/backend-stack.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,13 @@ export class BackendStack extends cdk.Stack {
431431
},
432432
});
433433

434+
const processFileIntegration = new apigateway.Integration({
435+
type: apigateway.IntegrationType.HTTP_PROXY,
436+
integrationHttpMethod: 'POST',
437+
uri: `${serviceUrl}/api/document-processor/process-file`,
438+
options: integrationOptions,
439+
});
440+
434441
// Define method options with authorization
435442
const methodOptions = {
436443
authorizer: authorizer,
@@ -457,6 +464,14 @@ export class BackendStack extends cdk.Stack {
457464
},
458465
});
459466

467+
// Add POST method to process file
468+
reportIdResource.addMethod('POST', processFileIntegration, {
469+
...methodOptions,
470+
requestParameters: {
471+
'method.request.path.id': true,
472+
},
473+
});
474+
460475
// Add CORS to each resource separately - after methods have been created
461476
const corsOptions = {
462477
allowOrigins: ['*'],

0 commit comments

Comments
 (0)