diff --git a/src/api/subscriptions.ts b/src/api/subscriptions.ts index 3904ca8..7602869 100644 --- a/src/api/subscriptions.ts +++ b/src/api/subscriptions.ts @@ -58,6 +58,28 @@ export async function getSubscriptionAuthorization( } } +export interface SubscriptionOption { + type: string; + price: number | null; + payout_address: number | null; +} + +export async function getSubscriptionOptions( + authToken: string, +): Promise { + const url = `${BACKEND_URL}/api/v1/subscriptions/options` + const response = await http(url, { + method: "GET", + authToken, + }) + const data = await response.json() + if (response.status !== 200) { + throw new Error(data.message) + } else { + return data + } +} + export async function configureSubscriptions( contractAddress: string, signer: Signer, diff --git a/src/components/SubscriptionSettingsEthereum.vue b/src/components/SubscriptionSettingsEthereum.vue index 540a24a..fe3c0a0 100644 --- a/src/components/SubscriptionSettingsEthereum.vue +++ b/src/components/SubscriptionSettingsEthereum.vue @@ -1,5 +1,5 @@