picker-db 3.9.11 → 4.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.
@@ -176,7 +176,8 @@ class PickerMongoDBService {
176
176
  */
177
177
  async deleteData (modelName, criteria) {
178
178
  return new Promise((resolve, reject) => {
179
- this.models[modelName].findOneAndRemove(criteria, (err, res) => {
179
+ // https://mongoosejs.com/docs/migrating_to_8.html#removed-findoneandremove
180
+ this.models[modelName].findOneAndDelete(criteria, (err, res) => {
180
181
  if (err) {
181
182
  return reject(err);
182
183
  }
@@ -299,6 +299,9 @@ module.exports = (connection) => {
299
299
  type: String,
300
300
  default: null,
301
301
  },
302
+ pickupZone: {
303
+ type: String,
304
+ },
302
305
  pickupAddress: {
303
306
  type: String,
304
307
  default: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picker-db",
3
- "version": "3.9.11",
3
+ "version": "4.0.0",
4
4
  "description": "Picker DB services",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "lodash": "^4.17.20",
26
- "mongoose": "^6.11.1",
26
+ "mongoose": "^8.0.4",
27
27
  "winston": "^3.3.3"
28
28
  }
29
29
  }