fix(ui): metadata edit call put to post
This commit is contained in:
parent
16778e9bb3
commit
3723afe3b2
2 changed files with 4 additions and 2 deletions
|
|
@ -44,9 +44,11 @@ const CustomFieldForm: React.FC<CustomFieldFormProps> = ({ siteId }) => {
|
|||
} else {
|
||||
toast.error(response.errors[0]);
|
||||
}
|
||||
}).catch(() => {
|
||||
toast.error('An error occurred while saving metadata.');
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export default class CustomFieldService extends BaseService {
|
|||
}
|
||||
|
||||
async update(projectId: string, instance: any): Promise<any> {
|
||||
return this.client.put(`/${projectId}/metadata/${instance.index}`, instance)
|
||||
return this.client.post(`/${projectId}/metadata/${instance.index}`, instance)
|
||||
.then(r => r.json()).then(j => j.data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue