const User = require('./../../models/user')

const usersRoutes = (api) => {
  api.post('/users', (req, res) => {
    User.create(req.body.user)
      .then((user) => {
        delete user.password

        res.status(201).send(user)
      })
      .catch((user) => {
        res.status(400).send({ 'errors': user.errors })
      })
  })
}

module.exports = usersRoutes

@@ -1,12 +1,43 @@
+const _    = require('lodash')%0A
 const User =
@@ -204,63 +204,55 @@
     
-delete user.password%0A%0A        res.status(201).send(user
+res.status(201).send(_.omit(user, %5B'password'%5D)
 )%0A  

Return model instance instead of simple object