mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 14:14:06 +00:00
back
small improvements, bug fixes, ocd formatting,
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user