change(person/route) put, takes previous values if not specified by user

This commit is contained in:
Yusuf İpek
2021-07-25 11:45:52 +03:00
parent 822b4340c5
commit 53694ac883
7 changed files with 174 additions and 16 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ function validatePerson(value) {
tags: Joi.array().max(6),
createdAt: Joi.string().max(25),
});
return schema.validate(value);
return schema.validate(value, { allowUnknown: true });
}
exports.Person = Person;