diff --git a/app.js b/app.js index 809cdbe..2ea2295 100644 --- a/app.js +++ b/app.js @@ -94,7 +94,7 @@ app.post('/register', (req, res) => { }), req.body.password, (err, account) => { if (err) { return res.render('register', { - err: account + err: err.message }); console.log(account); // res.send({err: account}); diff --git a/views/register.hbs b/views/register.hbs index 47ee4a4..d73edb6 100644 --- a/views/register.hbs +++ b/views/register.hbs @@ -1,3 +1,6 @@ +{{#if err}} +