nextjs-mongodb-app
nextjs-mongodb-app copied to clipboard
in edit profile, i am getting req.body is undefined
i added some values in the profile and want to edit them, so i did like in code here https://github.com/hoangvvo/nextjs-mongodb-app/blob/v2/pages/api/user/index.js
const {quote} = req.body;
but i get this error
Cannot destructure property 'baseName' of 'req.body' as it is undefined."
even console.log(req.body)
gives undefined.