mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 11:45:48 +02:00
fix: user creation POST route returns user data, updated openapi spec
This commit is contained in:
@@ -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(', ')));
|
||||
|
||||
Reference in New Issue
Block a user