diff --git a/routes/_api/followsAndFollowers.js b/routes/_api/followsAndFollowers.js new file mode 100644 index 00000000..607e5cec --- /dev/null +++ b/routes/_api/followsAndFollowers.js @@ -0,0 +1,14 @@ +import { getWithTimeout, paramsString } from '../_utils/ajax' +import { auth, basename } from './utils' + +export async function getFollows (instanceName, accessToken, accountId, limit = 80) { + let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/following` + url += '?' + paramsString({ limit }) + return getWithTimeout(url, auth(accessToken)) +} + +export async function getFollowers (instanceName, accessToken, accountId, limit = 80) { + let url = `${basename(instanceName)}/api/v1/accounts/${accountId}/followers` + url += '?' + paramsString({ limit }) + return getWithTimeout(url, auth(accessToken)) +} diff --git a/routes/_components/profile/AccountProfileDetails.html b/routes/_components/profile/AccountProfileDetails.html index 4a89b5bc..bf8d34a7 100644 --- a/routes/_components/profile/AccountProfileDetails.html +++ b/routes/_components/profile/AccountProfileDetails.html @@ -8,20 +8,24 @@
{{#if account && verifyCredentials && account.id !== verifyCredentials.id}} @@ -130,4 +134,4 @@ IconButton } } - \ No newline at end of file + diff --git a/routes/_pages/accounts/[accountId]/followers.html b/routes/_pages/accounts/[accountId]/followers.html new file mode 100644 index 00000000..f2f711d6 --- /dev/null +++ b/routes/_pages/accounts/[accountId]/followers.html @@ -0,0 +1,20 @@ +