fix(ui): metadata edit call put to post

This commit is contained in:
Shekar Siri 2024-11-08 12:03:28 +01:00
parent 16778e9bb3
commit 3723afe3b2
2 changed files with 4 additions and 2 deletions

View file

@ -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 (

View file

@ -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);
}