From 45e7f93c49042c365badf0043ebd0480ecbb9c49 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Mon, 18 Nov 2019 20:33:07 -0500
Subject: [PATCH] refactor toggleActivationStatus
---
src/services/api/api.service.js | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index dbc8320efd..b739ec1fae 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -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 }) => {