Skip to content

Commit 957c732

Browse files
Fix sonar attempt
1 parent d93c073 commit 957c732

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

lambdas/api-handler/src/config/deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function createLetterRepository(log: pino.Logger, lambdaEnv: LambdaEnv): LetterR
2121
const docClient = DynamoDBDocumentClient.from(ddbClient);
2222
const config = {
2323
lettersTableName: lambdaEnv.LETTERS_TABLE_NAME,
24-
ttlHours: parseInt(lambdaEnv.LETTER_TTL_HOURS, BASE_TEN),
24+
ttlHours: Number.parseInt(lambdaEnv.LETTER_TTL_HOURS, BASE_TEN),
2525
};
2626

2727
return new LetterRepository(docClient, log, config);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const deps: Deps = getDeps();
1010

1111
export const getLetterData: APIGatewayProxyHandler = async (event) => {
1212

13-
let correlationId;
13+
let correlationId: string | undefined;
1414

1515
try {
1616
assertNotEmpty(event.headers, new Error("The request headers are empty"));

lambdas/api-handler/src/handlers/get-letters.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const status = "PENDING";
1919
export const getLetters: APIGatewayProxyHandler = async (event) => {
2020

2121
const { maxLimit } = getMaxLimit();
22-
let correlationId;
22+
23+
let correlationId: string | undefined;
2324

2425
try {
2526
assertNotEmpty(event.headers, new Error("The request headers are empty"));

lambdas/api-handler/src/handlers/patch-letter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const deps: Deps = getDeps();
1212

1313
export const patchLetter: APIGatewayProxyHandler = async (event) => {
1414

15-
let correlationId;
15+
let correlationId: string | undefined;
1616

1717
try {
1818
assertNotEmpty(event.headers, new Error('The request headers are empty'));

0 commit comments

Comments
 (0)