updated api.put to use params
This commit is contained in:
@@ -206,7 +206,10 @@ const handleSubmit = async () => {
|
|||||||
if (route.params.id) {
|
if (route.params.id) {
|
||||||
post_id = route.params.id as string;
|
post_id = route.params.id as string;
|
||||||
await api.put({
|
await api.put({
|
||||||
url: `/posts/${route.params.id}`,
|
url: `/posts/{id}`,
|
||||||
|
params: {
|
||||||
|
id: route.params.id,
|
||||||
|
},
|
||||||
body: data,
|
body: data,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user