mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
Upgrade mongoose (#10767)
* fix mongoose and upgrade * fix more validations
This commit is contained in:
120
package-lock.json
generated
120
package-lock.json
generated
@@ -14761,9 +14761,9 @@
|
||||
"integrity": "sha512-KEyanRIDHooo8KuBxY3CC019NbwHtxdsxzRJUfaGqcxMrvBPBkosN+RUxx1nZFI6yrErq3KTW8HI/qrNIxHe0g=="
|
||||
},
|
||||
"kareem": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.1.0.tgz",
|
||||
"integrity": "sha512-ycoMY1tVkcH1/NaxGn2erZaUC3CodmX7Fl6DUVXjN73+uecWYTaaldRkxNY3HeSKQnQTWnoxRKnZfVHcB8tIWg=="
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz",
|
||||
"integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg=="
|
||||
},
|
||||
"karma": {
|
||||
"version": "3.0.0",
|
||||
@@ -16768,6 +16768,12 @@
|
||||
"readable-stream": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"memory-pager": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.1.0.tgz",
|
||||
"integrity": "sha512-Mf9OHV/Y7h6YWDxTzX/b4ZZ4oh9NSXblQL8dtPCOomOtZciEHxePR78+uHFLLlsk01A6jVHhHsQZZ/WcIPpnzg==",
|
||||
"optional": true
|
||||
},
|
||||
"memwatch-next": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/memwatch-next/-/memwatch-next-0.3.0.tgz",
|
||||
@@ -17233,46 +17239,58 @@
|
||||
}
|
||||
},
|
||||
"mongodb": {
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.0.8.tgz",
|
||||
"integrity": "sha512-mj7yIUyAr9xnO2ev8pcVJ9uX7gSum5LLs1qIFoWLxA5Il50+jcojKtaO1/TbexsScZ9Poz00Pc3b86GiSqJ7WA==",
|
||||
"version": "3.1.6",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.6.tgz",
|
||||
"integrity": "sha512-E5QJuXQoMlT7KyCYqNNMfAkhfQD79AT4F8Xd+6x37OX+8BL17GyXyWvfm6wuyx4wnzCCPoCSLeMeUN2S7dU9yw==",
|
||||
"requires": {
|
||||
"mongodb-core": "3.0.8"
|
||||
"mongodb-core": "3.1.5",
|
||||
"safe-buffer": "^5.1.2"
|
||||
}
|
||||
},
|
||||
"mongodb-core": {
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.0.8.tgz",
|
||||
"integrity": "sha512-dFxfhH9N7ohuQnINyIl6dqEF8sYOE0WKuymrFf3L3cipJNrx+S8rAbNOTwa00/fuJCjBMJNFsaA+R2N16//UIw==",
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.5.tgz",
|
||||
"integrity": "sha512-emT/tM4ZBinqd6RZok+EzDdtN4LjYJIckv71qQVOEFmvXgT5cperZegVmTgox/1cx4XQu6LJ5ZuIwipP/eKdQg==",
|
||||
"requires": {
|
||||
"bson": "~1.0.4",
|
||||
"require_optional": "^1.0.1"
|
||||
"bson": "^1.1.0",
|
||||
"require_optional": "^1.0.1",
|
||||
"safe-buffer": "^5.1.2",
|
||||
"saslprep": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"bson": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-1.1.0.tgz",
|
||||
"integrity": "sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"mongoose": {
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.1.3.tgz",
|
||||
"integrity": "sha512-v+hHI/NxJtcVPm2cY+/kJfTfkkXVCz/le0iVdnh3enGi+fClhoaztjTtXQMdzIzNc+M0R93KcARpzvPQq/cWKQ==",
|
||||
"version": "5.3.4",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.3.4.tgz",
|
||||
"integrity": "sha512-DIUWOyYgZv2zGi/BoFEaFiaCVuDonnzGhW3cnc3JFjBScYn6z24tS2j3VB0dtMoX8FFjxmmMVnlmHPEIbV4PKA==",
|
||||
"requires": {
|
||||
"async": "2.1.4",
|
||||
"async": "2.6.1",
|
||||
"bson": "~1.0.5",
|
||||
"kareem": "2.1.0",
|
||||
"kareem": "2.3.0",
|
||||
"lodash.get": "4.4.2",
|
||||
"mongodb": "3.0.8",
|
||||
"mongodb": "3.1.6",
|
||||
"mongodb-core": "3.1.5",
|
||||
"mongoose-legacy-pluralize": "1.0.2",
|
||||
"mpath": "0.4.1",
|
||||
"mquery": "3.0.0",
|
||||
"mpath": "0.5.1",
|
||||
"mquery": "3.2.0",
|
||||
"ms": "2.0.0",
|
||||
"regexp-clone": "0.0.1",
|
||||
"safe-buffer": "5.1.2",
|
||||
"sliced": "1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"async": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-2.1.4.tgz",
|
||||
"integrity": "sha1-LSFgx3iAMuTdbL4lAvH5osj2zeQ=",
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
|
||||
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
|
||||
"requires": {
|
||||
"lodash": "^4.14.0"
|
||||
"lodash": "^4.17.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17417,30 +17435,34 @@
|
||||
}
|
||||
},
|
||||
"mpath": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "http://registry.npmjs.org/mpath/-/mpath-0.4.1.tgz",
|
||||
"integrity": "sha512-NNY/MpBkALb9jJmjpBlIi6GRoLveLUM0pJzgbp9vY9F7IQEb/HREC/nxrixechcQwd1NevOhJnWWV8QQQRE+OA=="
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.5.1.tgz",
|
||||
"integrity": "sha512-H8OVQ+QEz82sch4wbODFOz+3YQ61FYz/z3eJ5pIdbMEaUzDqA268Wd+Vt4Paw9TJfvDgVKaayC0gBzMIw2jhsg=="
|
||||
},
|
||||
"mquery": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.0.0.tgz",
|
||||
"integrity": "sha512-WL1Lk8v4l8VFSSwN3yCzY9TXw+fKVYKn6f+w86TRzOLSE8k1yTgGaLBPUByJQi8VcLbOdnUneFV/y3Kv874pnQ==",
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.0.tgz",
|
||||
"integrity": "sha512-qPJcdK/yqcbQiKoemAt62Y0BAc0fTEKo1IThodBD+O5meQRJT/2HSe5QpBNwaa4CjskoGrYWsEyjkqgiE0qjhg==",
|
||||
"requires": {
|
||||
"bluebird": "3.5.0",
|
||||
"debug": "2.6.9",
|
||||
"bluebird": "3.5.1",
|
||||
"debug": "3.1.0",
|
||||
"regexp-clone": "0.0.1",
|
||||
"sliced": "0.0.5"
|
||||
"safe-buffer": "5.1.2",
|
||||
"sliced": "1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"bluebird": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz",
|
||||
"integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw="
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
|
||||
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
|
||||
},
|
||||
"sliced": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz",
|
||||
"integrity": "sha1-XtwETKTrb3gW1Qui/GPiXY/kcH8="
|
||||
"debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -23387,6 +23409,15 @@
|
||||
"integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==",
|
||||
"dev": true
|
||||
},
|
||||
"saslprep": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.2.tgz",
|
||||
"integrity": "sha512-4cDsYuAjXssUSjxHKRe4DTZC0agDwsCqcMqtJAQPzC74nJ7LfAJflAtC1Zed5hMzEQKj82d3tuzqdGNRsLJ4Gw==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"sparse-bitfield": "^3.0.3"
|
||||
}
|
||||
},
|
||||
"sass-graph": {
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz",
|
||||
@@ -24122,6 +24153,15 @@
|
||||
"resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz",
|
||||
"integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw=="
|
||||
},
|
||||
"sparse-bitfield": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
|
||||
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"memory-pager": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"spdx-correct": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz",
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"method-override": "^3.0.0",
|
||||
"moment": "^2.22.1",
|
||||
"moment-recur": "^1.0.7",
|
||||
"mongoose": "^5.1.3",
|
||||
"mongoose": "^5.3.4",
|
||||
"morgan": "^1.7.0",
|
||||
"nconf": "^0.10.0",
|
||||
"node-gcm": "^1.0.2",
|
||||
|
||||
@@ -8,7 +8,7 @@ module.exports = function baseModel (schema, options = {}) {
|
||||
_id: {
|
||||
type: String,
|
||||
default: uuid,
|
||||
validate: [validator.isUUID, 'Invalid uuid.'],
|
||||
validate: [v => validator.isUUID(v), 'Invalid uuid.'],
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ let schema = new Schema({
|
||||
todos: [{type: String, ref: 'Task'}],
|
||||
rewards: [{type: String, ref: 'Task'}],
|
||||
},
|
||||
leader: {type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.'], required: true},
|
||||
group: {type: String, ref: 'Group', validate: [validator.isUUID, 'Invalid uuid.'], required: true},
|
||||
leader: {type: String, ref: 'User', validate: [v => validator.isUUID(v), 'Invalid uuid.'], required: true},
|
||||
group: {type: String, ref: 'Group', validate: [v => validator.isUUID(v), 'Invalid uuid.'], required: true},
|
||||
memberCount: {type: Number, default: 0},
|
||||
prize: {type: Number, default: 0, min: 0},
|
||||
categories: [{
|
||||
|
||||
@@ -9,7 +9,7 @@ export let schema = new mongoose.Schema({
|
||||
required: true,
|
||||
trim: true,
|
||||
lowercase: true,
|
||||
validator: [validator.isEmail, 'Invalid email.'],
|
||||
validator: [v => validator.isEmail(v), 'Invalid email.'],
|
||||
},
|
||||
}, {
|
||||
strict: true,
|
||||
|
||||
@@ -73,7 +73,7 @@ export let schema = new Schema({
|
||||
name: {type: String, required: true},
|
||||
summary: {type: String, maxlength: MAX_SUMMARY_SIZE_FOR_GUILDS},
|
||||
description: String,
|
||||
leader: {type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.'], required: true},
|
||||
leader: {type: String, ref: 'User', validate: [v => validator.isUUID(v), 'Invalid uuid.'], required: true},
|
||||
type: {type: String, enum: ['guild', 'party'], required: true},
|
||||
privacy: {type: String, enum: ['private', 'public'], default: 'private', required: true},
|
||||
chat: Array, // Used for backward compatibility, but messages aren't stored here
|
||||
|
||||
@@ -7,7 +7,7 @@ const Schema = mongoose.Schema;
|
||||
export let schema = new Schema({
|
||||
_id: {type: String, required: true}, // Use a custom string as _id
|
||||
consumed: {type: Boolean, default: false, required: true},
|
||||
userId: {type: String, ref: 'User', required: true, validate: [validator.isUUID, 'Invalid uuid.']},
|
||||
userId: {type: String, ref: 'User', required: true, validate: [v => validator.isUUID(v), 'Invalid uuid.']},
|
||||
}, {
|
||||
strict: true,
|
||||
minimize: false, // So empty objects are returned
|
||||
|
||||
@@ -5,7 +5,7 @@ import validator from 'validator';
|
||||
export let schema = new mongoose.Schema({
|
||||
planId: String,
|
||||
subscriptionId: String,
|
||||
owner: {type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.']},
|
||||
owner: {type: String, ref: 'User', validate: [v => validator.isUUID(v), 'Invalid uuid.']},
|
||||
quantity: {type: Number, default: 1},
|
||||
paymentMethod: String, // enum: ['Paypal', 'Stripe', 'Gift', 'Amazon Payments', 'Google', '']}
|
||||
customerId: String, // Billing Agreement Id in case of Amazon Payments
|
||||
|
||||
@@ -9,7 +9,7 @@ export let schema = new Schema({
|
||||
id: {
|
||||
type: String,
|
||||
default: uuid,
|
||||
validate: [validator.isUUID, 'Invalid uuid.'],
|
||||
validate: [v => validator.isUUID(v), 'Invalid uuid.'],
|
||||
required: true,
|
||||
},
|
||||
name: {type: String, required: true},
|
||||
|
||||
@@ -76,7 +76,7 @@ export let TaskSchema = new Schema({
|
||||
},
|
||||
tags: [{
|
||||
type: String,
|
||||
validate: [validator.isUUID, 'Invalid uuid.'],
|
||||
validate: [v => validator.isUUID(v), 'Invalid uuid.'],
|
||||
}],
|
||||
value: {type: Number, default: 0, required: true}, // redness or cost for rewards Required because it must be settable (for rewards)
|
||||
priority: {
|
||||
@@ -89,26 +89,26 @@ export let TaskSchema = new Schema({
|
||||
],
|
||||
},
|
||||
attribute: {type: String, default: 'str', enum: ['str', 'con', 'int', 'per']},
|
||||
userId: {type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.']}, // When not set it belongs to a challenge
|
||||
userId: {type: String, ref: 'User', validate: [v => validator.isUUID(v), 'Invalid uuid.']}, // When not set it belongs to a challenge
|
||||
|
||||
challenge: {
|
||||
shortName: {type: String},
|
||||
id: {type: String, ref: 'Challenge', validate: [validator.isUUID, 'Invalid uuid.']}, // When set (and userId not set) it's the original task
|
||||
taskId: {type: String, ref: 'Task', validate: [validator.isUUID, 'Invalid uuid.']}, // When not set but challenge.id defined it's the original task
|
||||
id: {type: String, ref: 'Challenge', validate: [v => validator.isUUID(v), 'Invalid uuid.']}, // When set (and userId not set) it's the original task
|
||||
taskId: {type: String, ref: 'Task', validate: [v => validator.isUUID(v), 'Invalid uuid.']}, // When not set but challenge.id defined it's the original task
|
||||
broken: {type: String, enum: ['CHALLENGE_DELETED', 'TASK_DELETED', 'UNSUBSCRIBED', 'CHALLENGE_CLOSED', 'CHALLENGE_TASK_NOT_FOUND']}, // CHALLENGE_TASK_NOT_FOUND comes from v3 migration
|
||||
winner: String, // user.profile.name of the winner
|
||||
},
|
||||
|
||||
group: {
|
||||
id: {type: String, ref: 'Group', validate: [validator.isUUID, 'Invalid uuid.']},
|
||||
id: {type: String, ref: 'Group', validate: [v => validator.isUUID(v), 'Invalid uuid.']},
|
||||
broken: {type: String, enum: ['GROUP_DELETED', 'TASK_DELETED', 'UNSUBSCRIBED']},
|
||||
assignedUsers: [{type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.']}],
|
||||
taskId: {type: String, ref: 'Task', validate: [validator.isUUID, 'Invalid uuid.']},
|
||||
assignedUsers: [{type: String, ref: 'User', validate: [v => validator.isUUID(v), 'Invalid uuid.']}],
|
||||
taskId: {type: String, ref: 'Task', validate: [v => validator.isUUID(v), 'Invalid uuid.']},
|
||||
approval: {
|
||||
required: {type: Boolean, default: false},
|
||||
approved: {type: Boolean, default: false},
|
||||
dateApproved: {type: Date},
|
||||
approvingUser: {type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.']},
|
||||
approvingUser: {type: String, ref: 'User', validate: [v => validator.isUUID(v), 'Invalid uuid.']},
|
||||
requested: {type: Boolean, default: false},
|
||||
requestedDate: {type: Date},
|
||||
},
|
||||
@@ -117,7 +117,7 @@ export let TaskSchema = new Schema({
|
||||
|
||||
reminders: [{
|
||||
_id: false,
|
||||
id: {type: String, validate: [validator.isUUID, 'Invalid uuid.'], default: shared.uuid, required: true},
|
||||
id: {type: String, validate: [v => validator.isUUID(v), 'Invalid uuid.'], default: shared.uuid, required: true},
|
||||
startDate: {type: Date},
|
||||
time: {type: Date, required: true},
|
||||
}],
|
||||
@@ -265,7 +265,7 @@ let dailyTodoSchema = () => {
|
||||
completed: {type: Boolean, default: false},
|
||||
text: {type: String, required: false, default: ''}, // required:false because it can be empty on creation
|
||||
_id: false,
|
||||
id: {type: String, default: shared.uuid, required: true, validate: [validator.isUUID, 'Invalid uuid.']},
|
||||
id: {type: String, default: shared.uuid, required: true, validate: [v => validator.isUUID(v), 'Invalid uuid.']},
|
||||
linkId: {type: String},
|
||||
}],
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ let schema = new Schema({
|
||||
email: {
|
||||
type: String,
|
||||
validate: [{
|
||||
validator: validator.isEmail,
|
||||
validator: (v) => validator.isEmail(v),
|
||||
message: shared.i18n.t('invalidEmail'),
|
||||
}, {
|
||||
validator (email) {
|
||||
@@ -374,7 +374,7 @@ let schema = new Schema({
|
||||
return {};
|
||||
}},
|
||||
|
||||
challenges: [{type: String, ref: 'Challenge', validate: [validator.isUUID, 'Invalid uuid.']}],
|
||||
challenges: [{type: String, ref: 'Challenge', validate: [v => validator.isUUID(v), 'Invalid uuid.']}],
|
||||
|
||||
invitations: {
|
||||
// Using an array without validation because otherwise mongoose treat this as a subdocument and applies _id by default
|
||||
@@ -391,7 +391,7 @@ let schema = new Schema({
|
||||
type: String,
|
||||
ref: 'Group',
|
||||
required: true,
|
||||
validate: [validator.isUUID, 'Invalid uuid.'],
|
||||
validate: [v => validator.isUUID(v), 'Invalid uuid.'],
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
@@ -401,15 +401,15 @@ let schema = new Schema({
|
||||
type: String,
|
||||
ref: 'User',
|
||||
required: true,
|
||||
validate: [validator.isUUID, 'Invalid uuid.'],
|
||||
validate: [v => validator.isUUID(v), 'Invalid uuid.'],
|
||||
},
|
||||
}],
|
||||
},
|
||||
|
||||
guilds: [{type: String, ref: 'Group', validate: [validator.isUUID, 'Invalid uuid.']}],
|
||||
guilds: [{type: String, ref: 'Group', validate: [v => validator.isUUID(v), 'Invalid uuid.']}],
|
||||
|
||||
party: {
|
||||
_id: {type: String, validate: [validator.isUUID, 'Invalid uuid.'], ref: 'Group'},
|
||||
_id: {type: String, validate: [v => validator.isUUID(v), 'Invalid uuid.'], ref: 'Group'},
|
||||
order: {type: String, default: 'level'},
|
||||
orderAscending: {type: String, default: 'ascending'},
|
||||
quest: {
|
||||
|
||||
@@ -39,7 +39,7 @@ export let schema = new Schema({
|
||||
id: {
|
||||
type: String,
|
||||
default: uuid,
|
||||
validate: [validator.isUUID, 'Invalid uuid.'],
|
||||
validate: [v => validator.isUUID(v), 'Invalid uuid.'],
|
||||
// @TODO: Add these back once we figure out the issue with notifications
|
||||
// See Fix for https://github.com/HabitRPG/habitica/issues/9923
|
||||
// required: true,
|
||||
|
||||
@@ -34,7 +34,7 @@ export let schema = new Schema({
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
validate: [validator.isUUID, shared.i18n.t('invalidWebhookId')],
|
||||
validate: [v => validator.isUUID(v), shared.i18n.t('invalidWebhookId')],
|
||||
default: uuid,
|
||||
},
|
||||
type: {
|
||||
|
||||
Reference in New Issue
Block a user