mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
fix: user creation POST route returns user data, updated openapi spec
This commit is contained in:
@@ -17,9 +17,7 @@ module.exports = function () {
|
||||
|
||||
app.post('/', middleware.checkRequired.bind(null, ['username']), middleware.authenticate, middleware.isAdmin, async (req, res) => {
|
||||
const uid = await users.create(req.body);
|
||||
helpers.formatApiResponse(200, res, {
|
||||
uid: uid,
|
||||
});
|
||||
helpers.formatApiResponse(200, res, await users.getUserData(uid));
|
||||
});
|
||||
|
||||
// app.route('/:uid')
|
||||
|
||||
Reference in New Issue
Block a user