fixed issue with user creation

This commit is contained in:
2020-04-12 19:24:55 -04:00
parent ab108ebec8
commit 7d9ea08ec9
3 changed files with 3 additions and 9 deletions

View File

@ -15,6 +15,8 @@ router.get('/', async function(req, res, next){
router.post('/', async function(req, res, next){
try{
req.body.created_by = req.user.username
return res.json({results: await User.add(req.body)});
}catch(error){
next(error);