refactor: reformat files to require parens around params (#316)

This commit is contained in:
Dan Orlando 2023-05-18 11:44:07 -07:00 committed by GitHub
parent 91ef4872d6
commit a17b878617
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 106 additions and 106 deletions

View file

@ -10,8 +10,8 @@ const handleDuplicateKeyError = (err, res) => {
//handle validation errors
const handleValidationError = (err, res) => {
console.log('congrats you hit the validation middleware');
let errors = Object.values(err.errors).map(el => el.message);
let fields = Object.values(err.errors).map(el => el.path);
let errors = Object.values(err.errors).map((el) => el.message);
let fields = Object.values(err.errors).map((el) => el.path);
let code = 400;
if (errors.length > 1) {
const formattedErrors = errors.join(' ');