From e0f4471eec8366a3c515e3f3f7594cbfeb442a6d Mon Sep 17 00:00:00 2001 From: mrloop Date: Sun, 9 Oct 2022 09:24:56 +0100 Subject: [PATCH] Instantiate constant as needs a value not a factory --- src/good/repositories/package.repository.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/good/repositories/package.repository.ts b/src/good/repositories/package.repository.ts index 2af6810..2f0fde3 100644 --- a/src/good/repositories/package.repository.ts +++ b/src/good/repositories/package.repository.ts @@ -30,5 +30,5 @@ export class PackageRepository { // Inject a raw DynamoDB client. Can easily replace with a mock for unit testing // or a wrapper that enhances the default behavior. -Injector.registerConstant('DynamoDB', () => new DynamoDB.DocumentClient()); +Injector.registerConstant('DynamoDB', new DynamoDB.DocumentClient()); Injector.register(PackageRepository, ['DynamoDB']);