diff --git a/src/api/subscriptions.ts b/src/api/subscriptions.ts index adb7a01..9f8d3c2 100644 --- a/src/api/subscriptions.ts +++ b/src/api/subscriptions.ts @@ -7,7 +7,7 @@ import { ethereumAddressMatch, EthereumSignature } from "@/utils/ethereum" import { floatToBigNumber, roundBigNumber } from "@/utils/numbers" import { http } from "./common" import { Contracts, getContract } from "./contracts" -import { User } from "./users" +import { Profile, User } from "./users" const SECONDS_IN_DAY = 3600 * 24 const SECONDS_IN_MONTH = SECONDS_IN_DAY * 30 @@ -227,6 +227,22 @@ export async function cancelSubscription( return transaction } +export interface Subscription { + id: number, + sender: Profile, + sender_address: string, +} + +export async function getSubscribers( + authToken: string, + accountId: string, +): Promise { + const url = `${BACKEND_URL}/api/v1/accounts/${accountId}/subscribers` + const response = await http(url, { authToken }) + const data = await response.json() + return data +} + export async function withdrawReceived( contractAddress: string, signer: Signer, diff --git a/src/components/ProfileListItem.vue b/src/components/ProfileListItem.vue index dd98b98..28204d9 100644 --- a/src/components/ProfileListItem.vue +++ b/src/components/ProfileListItem.vue @@ -1,11 +1,11 @@