Switch to new Subscription API
This commit is contained in:
parent
d77e98aa31
commit
2b3e578ee4
1 changed files with 3 additions and 2 deletions
|
@ -44,7 +44,7 @@ export async function getSubscriptionAuthorization(
|
|||
authToken: string,
|
||||
pricePerSec: BigNumber,
|
||||
): Promise<EthereumSignature> {
|
||||
const url = `${BACKEND_URL}/api/v1/accounts/authorize_subscription`
|
||||
const url = `${BACKEND_URL}/api/v1/subscriptions/authorize`
|
||||
const response = await http(url, {
|
||||
method: "GET",
|
||||
authToken,
|
||||
|
@ -79,10 +79,11 @@ export async function configureSubscriptions(
|
|||
export async function onSubscriptionsEnabled(
|
||||
authToken: string,
|
||||
): Promise<User> {
|
||||
const url = `${BACKEND_URL}/api/v1/accounts/subscriptions_enabled`
|
||||
const url = `${BACKEND_URL}/api/v1/subscriptions/enable`
|
||||
const response = await http(url, {
|
||||
method: "POST",
|
||||
authToken,
|
||||
json: { type: "ethereum" },
|
||||
})
|
||||
const data = await response.json()
|
||||
if (response.status !== 200) {
|
||||
|
|
Loading…
Reference in a new issue