From b8f4167fb6fa448125aeecff80b201d74e27fe6a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 28 Nov 2019 11:37:32 +0100 Subject: Only display accepted followers/followings in about page --- shared/extra-utils/server/follows.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'shared') diff --git a/shared/extra-utils/server/follows.ts b/shared/extra-utils/server/follows.ts index 0379bb109..365263a22 100644 --- a/shared/extra-utils/server/follows.ts +++ b/shared/extra-utils/server/follows.ts @@ -2,15 +2,17 @@ import * as request from 'supertest' import { ServerInfo } from './servers' import { waitJobs } from './jobs' import { makePostBodyRequest } from '../requests/requests' +import { FollowState } from '@shared/models' -function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { +function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string, state?: FollowState) { const path = '/api/v1/server/followers' const query = { start, count, sort, - search + search, + state } return request(url) @@ -43,14 +45,15 @@ function rejectFollower (url: string, token: string, follower: string, statusCod }) } -function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { +function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string, state?: FollowState) { const path = '/api/v1/server/following' const query = { start, count, sort, - search + search, + state } return request(url) -- cgit v1.2.3