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
1 changed files with 5 additions and 8 deletions

View File

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