I'm trying to insert a new user into the database and I want to make sure that when we return the newly created user, the password column is not returned. I tried chanining on returning() but I always get the password back as well.Any Ideas as to why this doesn't work?const newUser = await User.query() .insert({ username: req.body.username, email: req.body.email, password: req.body.password, passwordConfirm: req.body.passwordConfirm, }) .returning("id", "email", "username");
Submitted July 02, 2020 at 03:50AM by sloppy_networks
No comments:
Post a Comment