actions/me: do it with a const

This commit is contained in:
Alex Gleason 2022-04-29 21:41:41 -05:00
parent 20013cf712
commit ce73b30237
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -50,14 +50,11 @@ export function patchMe(params, formData = false) {
return (dispatch, getState) => {
dispatch(patchMeRequest());
let options = {};
if (formData) {
options = {
headers: {
'Content-Type': 'multipart/form-data',
},
};
}
const options = formData ? {
headers: {
'Content-Type': 'multipart/form-data',
},
} : {};
return api(getState)
.patch('/api/v1/accounts/update_credentials', params, options)