Skip to content

Commit b9ef531

Browse files
committed
Fixes
1 parent 45f52a1 commit b9ef531

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

infrastructure/terraform/components/api/module_lambda_post_mi.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module "post_mi" {
2222
function_code_base_path = local.aws_lambda_functions_dir_path
2323
function_code_dir = "api-handler/dist"
2424
function_include_common = true
25-
handler_function_name = "patchLetter"
25+
handler_function_name = "postMi"
2626
runtime = "nodejs22.x"
2727
memory = 128
2828
timeout = 5

lambdas/api-handler/src/handlers/__tests__/post-mi.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ describe('postMI API Handler', () => {
8181

8282
it('returns 400 Bad Request when there is no body', async () => {
8383
const event = makeApiGwEvent({
84-
path: '/letters/id1',
85-
pathParameters: {id: 'id1'},
84+
path: '/mi',
8685
headers: {'nhsd-supplier-id': 'supplier1', 'nhsd-correlation-id': 'correlationId'}
8786
});
8887

@@ -96,7 +95,7 @@ describe('postMI API Handler', () => {
9695

9796
it('returns 500 Internal Error when error is thrown by service', async () => {
9897
const event = makeApiGwEvent({
99-
path: '/letters/id1',
98+
path: '/mi',
10099
body: requestBody,
101100
pathParameters: {id: 'id1'},
102101
headers: {'nhsd-supplier-id': 'supplier1', 'nhsd-correlation-id': 'correlationId'}

lambdas/api-handler/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// Export all handlers for ease of access
22
export { getLetters } from './handlers/get-letters';
33
export { patchLetter } from './handlers/patch-letter';
4+
export { postMi } from './handlers/post-mi';

0 commit comments

Comments
 (0)