diff options
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r-- | shared/extra-utils/server/follows.ts | 11 |
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' | |||
2 | import { ServerInfo } from './servers' | 2 | import { ServerInfo } from './servers' |
3 | import { waitJobs } from './jobs' | 3 | import { waitJobs } from './jobs' |
4 | import { makePostBodyRequest } from '../requests/requests' | 4 | import { makePostBodyRequest } from '../requests/requests' |
5 | import { FollowState } from '@shared/models' | ||
5 | 6 | ||
6 | function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { | 7 | function 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 | ||
46 | function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { | 48 | function 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) |