From 5bcbd06a52a443d4425a0e71697a862445e02ad2 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Fri, 10 Nov 2017 17:09:44 +0100 Subject: [PATCH] Only register a MongoCollectionInjector, when using MongoDB --- source/calendarwebapp/configuration.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/calendarwebapp/configuration.d b/source/calendarwebapp/configuration.d index a010cc4..3a7cf25 100644 --- a/source/calendarwebapp/configuration.d +++ b/source/calendarwebapp/configuration.d @@ -32,6 +32,7 @@ public: container.register!MongoClient.existingInstance(mongoClient); container.register!(EventStore, MongoDBEventStore!()); container.register!(Authenticator, MongoDBAuthenticator!()); + container.register!(ValueInjector!MongoCollection, MongoCollectionInjector); logInfo("Using MongoDB as database system"); break; case mysql: @@ -51,7 +52,6 @@ public: container.register!(RandomNumberGenerator, AutoSeededRNG); container.register!CalendarWebapp; container.register!(ValueInjector!string, StringInjector); - container.register!(ValueInjector!MongoCollection, MongoCollectionInjector); } }