actions/me: do it with a const
This commit is contained in:
parent
20013cf712
commit
ce73b30237
|
@ -50,14 +50,11 @@ export function patchMe(params, formData = false) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
dispatch(patchMeRequest());
|
dispatch(patchMeRequest());
|
||||||
|
|
||||||
let options = {};
|
const options = formData ? {
|
||||||
if (formData) {
|
headers: {
|
||||||
options = {
|
'Content-Type': 'multipart/form-data',
|
||||||
headers: {
|
},
|
||||||
'Content-Type': 'multipart/form-data',
|
} : {};
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return api(getState)
|
return api(getState)
|
||||||
.patch('/api/v1/accounts/update_credentials', params, options)
|
.patch('/api/v1/accounts/update_credentials', params, options)
|
||||||
|
|
Loading…
Reference in New Issue