Mongodb – I have a simple CRUD in Node JS and use Mongoose, why is postman still showing a 400 bad request when POSTing?
This is my code in userController.js const registerUser = asyncHandler(async (req, res) => { const {name, email, password, phoneNumber} = req.body if(!name || !email || !password || !phoneNumber) { res.status(400) throw new Error('Please add all fields') } res.json({ message: 'Register…