mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 14:14:06 +00:00
back again...
bit of validation, some fixes, some auth corrections scrapped graph db stuff some misc. stuff, check the diff if you want bruh
This commit is contained in:
@@ -2,6 +2,7 @@ const { validationResult } = require("express-validator");
|
||||
|
||||
const typedefs = require("../typedefs");
|
||||
const { getNestedValuesString } = require("../utils/jsonTransformer");
|
||||
const logger = require("../utils/logger")(module);
|
||||
|
||||
/**
|
||||
* Refer: https://stackoverflow.com/questions/58848625/access-messages-in-express-validator
|
||||
@@ -17,7 +18,7 @@ const validate = (req, res, next) => {
|
||||
}
|
||||
const extractedErrors = []
|
||||
errors.array().map(err => extractedErrors.push({
|
||||
[err.param]: err.msg
|
||||
[err.path]: err.msg
|
||||
}));
|
||||
|
||||
return res.status(400).json({
|
||||
|
||||
Reference in New Issue
Block a user