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

@@ -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')