fix: user creation POST route returns user data, updated openapi spec

This commit is contained in:
Julian Lam
2020-03-27 16:37:14 -04:00
parent 91b79f1793
commit bba2a4638c
3 changed files with 64 additions and 43 deletions

View File

@@ -243,7 +243,7 @@ middleware.checkRequired = function (fields, req, res, next) {
const missing = fields.filter(field => !req.body.hasOwnProperty(field));
if (!missing.length) {
next();
return next();
}
controllers.helpers.formatApiResponse(400, res, new Error('Required parameters were missing from this API call: ' + missing.join(', ')));