Skip to content

Commit 95bc137

Browse files
Fix location header
1 parent f2cf557 commit 95bc137

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lambdas/api-handler/src/handlers/__tests__/get-letter-data.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ describe('API Lambda handler', () => {
4747

4848
expect(result).toEqual({
4949
statusCode: 303,
50-
Location: 'https://somePreSignedUrl.com',
50+
headers: {
51+
'Location': 'https://somePreSignedUrl.com',
52+
},
5153
body: ''
5254
});
5355
});

lambdas/api-handler/src/handlers/get-letter-data.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export const getLetterData: APIGatewayProxyHandler = async (event) => {
2222

2323
return {
2424
statusCode: 303,
25-
Location: await getLetterDataUrl(supplierId, letterId, letterRepo),
25+
headers: {
26+
'Location': await getLetterDataUrl(supplierId, letterId, letterRepo)
27+
},
2628
body: ''
2729
};
2830
}

0 commit comments

Comments
 (0)