@justair/justair-library 6.14.0 → 7.0.0

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.
@@ -134,7 +134,7 @@ const CROSS_FIELD_QUIET_HOURS_CODES = new Set([
134
134
  QUIET_HOURS_ERRORS.EQUAL_PAIR,
135
135
  ]);
136
136
 
137
- usersSchema.pre("validate", function (next) {
137
+ usersSchema.pre("validate", function () {
138
138
  const errors = validateQuietHours({
139
139
  start: this.quietHoursStart,
140
140
  end: this.quietHoursEnd,
@@ -148,7 +148,6 @@ usersSchema.pre("validate", function (next) {
148
148
  this.invalidate("quietHoursEnd", error.message);
149
149
  }
150
150
  }
151
- next();
152
151
  });
153
152
 
154
153
  usersSchema.index({ phone: 1 });