fix(#635): sentry bug fix
parent
86934cf6b8
commit
1e0a2cfc2d
@ -1 +1,6 @@ |
||||
export const parseJSON = (response: Response) => response.json() |
||||
export const parseJSON = (response: Response) => { |
||||
if (response.status === 204) { |
||||
return Promise.resolve() |
||||
} |
||||
return response.json() |
||||
} |
||||
|
||||
@ -1,15 +1,13 @@ |
||||
import { API_ROOT } from 'config' |
||||
import { PAYMENT_API_URL } from 'config' |
||||
import { callApi } from 'helpers' |
||||
|
||||
export const cancelSubscribe = (id: number): Promise<unknown> => { |
||||
const config = { |
||||
body: { |
||||
id, |
||||
}, |
||||
method: 'DELETE', |
||||
} |
||||
|
||||
return callApi({ |
||||
config, |
||||
url: `${API_ROOT}/account/subscription/cancel`, |
||||
url: `${PAYMENT_API_URL}/api/v2/general/subscription/${id}`, |
||||
}) |
||||
} |
||||
|
||||
Loading…
Reference in new issue