Skip to content
Snippets Groups Projects
Unverified Commit b1d00c1d authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Fix site settings not updating (#5591)

parent f8a66368
No related branches found
No related tags found
No related merge requests found
......@@ -26,20 +26,18 @@ export default function useUpdateSiteSetting(name) {
const uploadPresentation = (data) => {
let settings;
let headers = { 'Content-Type': 'application/json' };
if (name === 'BrandingImage') {
fileValidation(data, 'image');
settings = new FormData();
settings.append('site_setting[value]', data);
headers = { 'Content-Type': 'multipart/form-data' };
} else {
settings = data;
}
return axios.patch(`/admin/site_settings/${name}.json`, settings, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
return axios.patch(`/admin/site_settings/${name}.json`, settings, { headers });
};
const handleSuccess = () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment