atharvadeosthale / rest-api-mysql-article

17 stars 18 forks source link

Not able to POST through the API #1

Open lamynes opened 2 years ago

lamynes commented 2 years ago

I am using your example exactly as it is and I can't seem to Post/Insert data.

Example app listening at http://localhost:3000

Error while creating programming language Unknown column 'undefined' in 'field list' Unknown column 'undefined' in 'field list' Error: Unknown column 'undefined' in 'field list' at PromiseConnection.execute (C:\Users\lamyn\OneDrive\Documents\nodeApp\programming-languages-api\node_modules\mysql2\promise.js:111:22) at Object.query (C:\Users\lamyn\OneDrive\Documents\nodeApp\programming-languages-api\services\db.js:6:40) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Object.create (C:\Users\lamyn\OneDrive\Documents\nodeApp\programming-languages-api\services\programmingLanguages.js:21:18) at async C:\Users\lamyn\OneDrive\Documents\nodeApp\programming-languages-api\routes\programmingLanguages.js:18:14

ReactNativeSandeep commented 2 years ago

POST_Raw_Data @lamynes you have to POST the Data in the Row in Postman Like in the Attached Screenshot. it will Resolve your issue.