small improvements, bug fixes, ocd formatting,
This commit is contained in:
2024-12-26 03:13:35 -07:00
parent fa9208940a
commit d999db53ae
28 changed files with 178 additions and 181 deletions

View File

@@ -20,13 +20,13 @@ const validate = (req, res, next) => {
const extractedErrors = [];
errors.array().forEach(err => {
if (err.type === 'alternative') {
if (err.type === "alternative") {
err.nestedErrors.forEach(nestedErr => {
extractedErrors.push({
[nestedErr.path]: nestedErr.msg
});
});
} else if (err.type === 'field') {
} else if (err.type === "field") {
extractedErrors.push({
[err.path]: err.msg
});