joye-backend-utility 2.0.6 → 2.0.7

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.
package/dist/database.js CHANGED
@@ -14,7 +14,7 @@ class database {
14
14
  useFindAndModify: false,
15
15
  user: config_1.DB_USER || '',
16
16
  pass: config_1.DB_PASSWORD || '',
17
- autoIndex: false, // True only for development
17
+ // autoIndex: false, // True only for development
18
18
  },
19
19
  };
20
20
  if (env !== 'production') {
@@ -102,9 +102,12 @@ const BrewSchema = new mongoose_1.Schema({
102
102
  required: true,
103
103
  },
104
104
  });
105
- BrewSchema.index({ userId: 1, date: -1 }, {
105
+ /* BrewSchema.index(
106
+ { userId: 1, date: -1 },
107
+ {
106
108
  unique: true,
107
- });
109
+ },
110
+ ); */
108
111
  const brewModel = (0, mongoose_1.model)('Brew', BrewSchema);
109
112
  brewModel.syncIndexes();
110
113
  exports.BrewModel = brewModel;
@@ -6,7 +6,7 @@ const MasterAppSettingSchema = new mongoose_1.Schema({
6
6
  key: {
7
7
  type: String,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  name: {
12
12
  type: String,
@@ -6,7 +6,7 @@ const MasterDataSchema = new mongoose_1.Schema({
6
6
  key: {
7
7
  type: String,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  dataType: {
12
12
  type: String,
@@ -6,7 +6,7 @@ const MasterEmotionsSchema = new mongoose_1.Schema({
6
6
  key: {
7
7
  type: String,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  name: {
12
12
  type: String,
@@ -6,7 +6,7 @@ const MasterPodcastSchema = new mongoose_1.Schema({
6
6
  key: {
7
7
  type: String,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  file: {
12
12
  type: String,
@@ -6,7 +6,7 @@ const MasterPredictionEmotionMessageSchema = new mongoose_1.Schema({
6
6
  masterPredictionEmotionKey: {
7
7
  type: String,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  messages: {
12
12
  type: Array,
@@ -6,7 +6,7 @@ const MasterThemeDataSchema = new mongoose_1.Schema({
6
6
  theme: {
7
7
  type: Number,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  appreciationMessages: {
12
12
  type: Array,
@@ -18,7 +18,7 @@ const OrganizationSchema = new mongoose_1.Schema({
18
18
  tId: {
19
19
  type: String,
20
20
  required: true,
21
- index: true,
21
+ // index: true,
22
22
  },
23
23
  emergency: {
24
24
  type: Object,
@@ -42,5 +42,5 @@ const OrganizationSchema = new mongoose_1.Schema({
42
42
  },
43
43
  });
44
44
  const organizationModel = (0, mongoose_1.model)('Organization', OrganizationSchema);
45
- organizationModel.syncIndexes();
45
+ // organizationModel.syncIndexes();
46
46
  exports.OrganizationModel = organizationModel;
@@ -10,7 +10,7 @@ const UserSchema = new mongoose_1.Schema({
10
10
  employeeId: {
11
11
  type: String,
12
12
  required: true,
13
- index: true,
13
+ // index: true,
14
14
  },
15
15
  happinessCounterLifetime: {
16
16
  type: Object,
@@ -104,7 +104,7 @@ const UserSchema = new mongoose_1.Schema({
104
104
  },
105
105
  botDetails: {
106
106
  type: Object,
107
- index: true,
107
+ // index: true,
108
108
  },
109
109
  uniqueCode: {
110
110
  type: String,
@@ -112,5 +112,5 @@ const UserSchema = new mongoose_1.Schema({
112
112
  },
113
113
  });
114
114
  const userModel = (0, mongoose_1.model)('User', UserSchema);
115
- userModel.syncIndexes();
115
+ // userModel.syncIndexes();
116
116
  exports.UserModel = userModel;
@@ -37,7 +37,7 @@ const UserMessageLogSchema = new mongoose_1.Schema({
37
37
  required: false,
38
38
  },
39
39
  });
40
- UserMessageLogSchema.index({ employeeId: 1, activityId: -1 });
40
+ // UserMessageLogSchema.index({ employeeId: 1, activityId: -1 });
41
41
  const userMessageLogModel = (0, mongoose_1.model)('User_Message_Log', UserMessageLogSchema);
42
- userMessageLogModel.syncIndexes();
42
+ // userMessageLogModel.syncIndexes();
43
43
  exports.UserMessageLogModel = userMessageLogModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joye-backend-utility",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Joye backend utility for db functions and common functions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",