aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-11-28 11:37:32 +0100
committerChocobozzz <me@florianbigard.com>2019-11-28 11:37:32 +0100
commitb8f4167fb6fa448125aeecff80b201d74e27fe6a (patch)
tree33179fe38e113b3bd88bae9782f4741754a85159 /shared
parentd275e75453015352d5b9387eaf5078e1ba5e0ea2 (diff)
downloadPeerTube-b8f4167fb6fa448125aeecff80b201d74e27fe6a.tar.gz
PeerTube-b8f4167fb6fa448125aeecff80b201d74e27fe6a.tar.zst
PeerTube-b8f4167fb6fa448125aeecff80b201d74e27fe6a.zip
Only display accepted followers/followings in about page
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/server/follows.ts11
1 files changed, 7 insertions, 4 deletions
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'
2import { ServerInfo } from './servers' 2import { ServerInfo } from './servers'
3import { waitJobs } from './jobs' 3import { waitJobs } from './jobs'
4import { makePostBodyRequest } from '../requests/requests' 4import { makePostBodyRequest } from '../requests/requests'
5import { FollowState } from '@shared/models'
5 6
6function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { 7function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string, state?: FollowState) {
7 const path = '/api/v1/server/followers' 8 const path = '/api/v1/server/followers'
8 9
9 const query = { 10 const query = {
10 start, 11 start,
11 count, 12 count,
12 sort, 13 sort,
13 search 14 search,
15 state
14 } 16 }
15 17
16 return request(url) 18 return request(url)
@@ -43,14 +45,15 @@ function rejectFollower (url: string, token: string, follower: string, statusCod
43 }) 45 })
44} 46}
45 47
46function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { 48function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string, state?: FollowState) {
47 const path = '/api/v1/server/following' 49 const path = '/api/v1/server/following'
48 50
49 const query = { 51 const query = {
50 start, 52 start,
51 count, 53 count,
52 sort, 54 sort,
53 search 55 search,
56 state
54 } 57 }
55 58
56 return request(url) 59 return request(url)