@common_ch/common 1.0.116 → 1.0.118

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.
@@ -7,6 +7,6 @@ export interface UserMessageByUserEvent {
7
7
  apiUsed: number;
8
8
  amountApiExistPlan: number;
9
9
  amountUploadExistPlan: number;
10
- versionUser: number;
10
+ versionUserPlanMessage: number;
11
11
  };
12
12
  }
@@ -135,6 +135,7 @@ userSchema.statics.build = (attrs) => {
135
135
  };
136
136
  userSchema.pre('save', function (done) {
137
137
  return __awaiter(this, void 0, void 0, function* () {
138
+ var _a;
138
139
  if (this.isModified('password')) {
139
140
  if (this.get('password')) {
140
141
  const hashed = yield password_1.Password.toHash(this.get('password'));
@@ -142,8 +143,9 @@ userSchema.pre('save', function (done) {
142
143
  }
143
144
  }
144
145
  if (this.isModified('versionPlanMessage')) {
146
+ const currentVersion = (_a = this.get('versionPlanMessage')) !== null && _a !== void 0 ? _a : 0;
145
147
  this.$where = {
146
- versionPlanMessage: this.get('versionPlanMessage') - 1,
148
+ versionPlanMessage: currentVersion - 1,
147
149
  };
148
150
  }
149
151
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common_ch/common",
3
- "version": "1.0.116",
3
+ "version": "1.0.118",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [