refactor toggleActivationStatus

This commit is contained in:
taehoon 2019-11-18 20:33:07 -05:00
parent 506822bed0
commit 45e7f93c49
1 changed files with 1 additions and 7 deletions

View File

@ -452,13 +452,7 @@ const deleteRight = ({ right, credentials, ...user }) => {
// eslint-disable-next-line camelcase
const toggleActivationStatus = ({ credentials, screen_name }) => {
const headers = authHeaders(credentials)
headers['Content-Type'] = 'application/json'
return fetch(TOGGLE_ACTIVATION_URL(screen_name), {
method: 'PATCH',
headers: headers
})
return promisedRequest({ url: TOGGLE_ACTIVATION_URL(screen_name), method: 'PATCH', credentials })
}
const deleteUser = ({ credentials, ...user }) => {