Reputation: 43
Been having this issue for a little while now. i have set up the category_create_post
functionality in the categoryController. i believe everything is done correctly by the looks of it. and also set up the category_form.ejs
to take in the users input however whenever i submit the form it throws an err saying the category name and description is blank. not able to understand or see why.
thanks
Edit: SOLVED
Upvotes: 1
Views: 31
Reputation: 80
Make sure your headers are set correctly especially Content-Type
. This heavily depends on the request API you use and the backend. I usually use axios
as my request API.
Upvotes: 2