X-Press publishing step 31

https://www.codecademy.com/paths/web-development/tracks/building-a-persistent-api/modules/persistent-api-cumulative-projects/projects/x-press-publishing

I have this error

and this is my code of the post request

i do not know whats wrong could someone help me pls

Hello, and welcome to the forums!

Did you remember to install and use the body-parser middleware? That’s the one that parses the incoming request and makes it available on req.body. Step #4 and #7 are the ones that mention incorporating it into the project.

If you did install and use body-parser, then make sure you’ve implemented it before the rest of your routes so that it can do its job before your routes handle the incoming requests.

1 Like

Thanks it worked…