This commit is contained in:
Henry Jameson 2018-12-25 14:28:49 +03:00
parent e3cac42cc7
commit 500b4bd374

View File

@ -47,10 +47,7 @@ function deleteSubscriptionFromBackEnd (token) {
}
}).then((response) => {
if (!response.ok) throw new Error('Bad status code from server.')
return response.json()
}).then((responseData) => {
if (!responseData.id) throw new Error('Bad response from server.')
return responseData
return response
})
}