Only register a MongoCollectionInjector, when using MongoDB

This commit is contained in:
Johannes Loher 2017-11-10 17:09:44 +01:00
parent 524cc11b3f
commit 5bcbd06a52

View file

@ -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);
}
}