dead-brownD
Refine14mo ago
dead-brown

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"?
Was this page helpful?