Skip to content

Commit f3a987a

Browse files
mishraompCopilot
andauthored
copilot suggestion
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 63bda45 commit f3a987a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

backend/src/dynamodb.service.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ export class DynamoDBService {
1616
private dynamoClient: DynamoDBDocumentClient;
1717
private tableName: string;
1818
constructor() {
19-
const clientConfig: any = {
19+
const clientConfig: DynamoDBClientConfig = {
2020
region: process.env.AWS_REGION || "ca-central-1", // Default to Canada Central if not set
21-
};
22-
const dynamoEndpoint =
23-
process.env.DYNAMODB_ENDPOINT || "http://localhost:8000"; // Default to local DynamoDB endpoint
24-
clientConfig.endpoint = dynamoEndpoint;
25-
clientConfig.credentials = {
26-
accessKeyId: process.env.AWS_ACCESS_KEY_ID || "dummy",
27-
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || "dummy",
21+
endpoint: process.env.DYNAMODB_ENDPOINT || "http://localhost:8000", // Default to local DynamoDB endpoint
22+
credentials: {
23+
accessKeyId: process.env.AWS_ACCESS_KEY_ID || "dummy",
24+
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || "dummy",
25+
},
2826
};
2927

3028
const client = new DynamoDBClient(

0 commit comments

Comments
 (0)