I'm using destructuring of req.body
to get all the field inputs.
But for some reason, the _csrf
token gets passed in??
Here's the code:
let bizReq = {
logo,
category,
name,
owner,
phone,
location,
website,
email,
} = req.body;
/// EG result (console.log(bizReq);)
new biz: {
name: 'Jasmine Gregory',
email: 'sojopo@mailinator.com',
location: 'Itaque aperiam iusto',
owner: { firstName: 'Mary', lastName: 'Garrett' },
phone: '+1 523 308-3805',
website: 'https://www.kezobazi.cm',
category: 'Clothes',
logo: 'https://eu.ui-avatars.com/api/?
background=89023E&color=fff&name=Jasmine+Gregory&length=2&size=512',
_csrf: 'ATqvC5qR-h1JPRec_usro3V4Pb6jYv80Tj5Y' ----------????---------
}
Where am I going wrong here? Thanks in advance