itlab-internal-services 1.13.7 → 1.13.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,6 +11,7 @@ exports.PopulateModule = void 0;
|
|
|
11
11
|
const common_1 = require("@nestjs/common");
|
|
12
12
|
const config_1 = require("@nestjs/config");
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongodb_1 = require("../mongodb");
|
|
14
15
|
const account_schema_1 = require("./account.schema");
|
|
15
16
|
const comment_schema_1 = require("./comment.schema");
|
|
16
17
|
const content_schema_1 = require("./content.schema");
|
|
@@ -18,8 +19,12 @@ const populate_service_1 = require("./populate.service");
|
|
|
18
19
|
const registerAsyncConnection = (database) => mongoose_1.MongooseModule.forRootAsync({
|
|
19
20
|
inject: [config_1.ConfigService],
|
|
20
21
|
connectionName: database.split('-')[1],
|
|
21
|
-
useFactory: (configService) => ({
|
|
22
|
-
|
|
22
|
+
useFactory: (configService) => (0, mongodb_1.useMongoFactory)({
|
|
23
|
+
appName: 'Populate Module',
|
|
24
|
+
dbName: database,
|
|
25
|
+
uri: configService.get('MONGO_SRV'),
|
|
26
|
+
username: configService.get('MONGO_USERNAME'),
|
|
27
|
+
password: configService.get('MONGO_PASSWORD'),
|
|
23
28
|
}),
|
|
24
29
|
});
|
|
25
30
|
let PopulateModule = PopulateModule_1 = class PopulateModule {
|