After creating an endpoint that handles a PUT request, I followed the knex documentation
to update the record in the database, the result I get when I test using POSTMAN is:
it keeps loading forever, I don't get any error or message in the terminal. But when I
console.log(req.body) it shows in the terminal the JSON sent from POSTMAN is hitting the
endpoint and I can see the data. I created other endpoints for GET requests using knex >
documentation and it is working fine except for the PUT method. I have attached 3
images; the first shows how POSTMAN keeps loading forever, and the
second shows the data I sent from POSTMAN being logged in the
terminal. And the code showing the endpoint and knex syntax.
我想让 knex 更新与记录的 id 与其接收的数据相匹配的记录。
喵喵时光机
相关分类