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:
2024-07-24 13:38:07 +05:30
parent 2225f5db49
commit 5803c997b2
13 changed files with 370 additions and 1720 deletions

View File

@@ -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({