mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Avoid setting profile name to not found (#8357)
* avoid setting profile name to not found * only set profile name when empty * profile.name is required * set profile name before validation * fix and add tests
This commit is contained in:
@@ -472,7 +472,11 @@ let schema = new Schema({
|
||||
profile: {
|
||||
blurb: String,
|
||||
imageUrl: String,
|
||||
name: String,
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
trim: true,
|
||||
},
|
||||
},
|
||||
stats: {
|
||||
hp: {type: Number, default: shared.maxHealth},
|
||||
|
||||
Reference in New Issue
Block a user