updated api.put to use params

This commit is contained in:
2023-04-01 07:23:07 +10:00
parent 96c8774e31
commit a74ace3bbd

View File

@@ -206,7 +206,10 @@ const handleSubmit = async () => {
if (route.params.id) {
post_id = route.params.id as string;
await api.put({
url: `/posts/${route.params.id}`,
url: `/posts/{id}`,
params: {
id: route.params.id,
},
body: data,
});
} else {