sunny-green•11mo ago
Hey there.
Hey there.
I have created API endpoints for updating records in my PostgreSQL database. I am using
useForm() hook and Edit component to render my form with its input fields. There's also a save button, presumably responsible to send a PATCH or PUT request and update the data. But when I'm in the /edit page and hit save, it returns a 404. In inspect, I see its request URL doesn't contain /edit. It's something like this: "posts/3". Shouldn't it be like this: "posts/edit/3"?1 Reply
statutory-emerald•11mo ago
Hello @okaeiz you can read our guides and concepts pages, especially data fetching section https://refine.dev/docs/guides-concepts/data-fetching/
Or go through our tutorial, https://refine.dev/tutorial to understand better.
posts/edit/3 is your client-side route. You need to update your data provider's updateOne method. Probably it's making PATCH posts/3 request to your API. You can also use AI chatbot in our documentation for your specific questions.Data Fetching | Refine
Data is essential for any UI Application and these applications are a bridge between users and the underlying data source(s), making it possible for users to interact with data in a meaningful way.