aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/follows.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-06-06 15:39:11 +0200
committerChocobozzz <me@florianbigard.com>2019-06-06 15:39:11 +0200
commit60919831276e9c9e9900258bec82b6c31e9e5dd3 (patch)
tree4c2396a9a8d0c4edfb07b14fab4207409520e9e1 /shared/extra-utils/server/follows.ts
parentad3405d087b306efa5eb62a69c9b797b04eab4ce (diff)
downloadPeerTube-60919831276e9c9e9900258bec82b6c31e9e5dd3.tar.gz
PeerTube-60919831276e9c9e9900258bec82b6c31e9e5dd3.tar.zst
PeerTube-60919831276e9c9e9900258bec82b6c31e9e5dd3.zip
Upgrade server dependencies
Diffstat (limited to 'shared/extra-utils/server/follows.ts')
-rw-r--r--shared/extra-utils/server/follows.ts24
1 files changed, 16 insertions, 8 deletions
diff --git a/shared/extra-utils/server/follows.ts b/shared/extra-utils/server/follows.ts
index 68c5a2e2b..0379bb109 100644
--- a/shared/extra-utils/server/follows.ts
+++ b/shared/extra-utils/server/follows.ts
@@ -6,12 +6,16 @@ import { makePostBodyRequest } from '../requests/requests'
6function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { 6function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) {
7 const path = '/api/v1/server/followers' 7 const path = '/api/v1/server/followers'
8 8
9 const query = {
10 start,
11 count,
12 sort,
13 search
14 }
15
9 return request(url) 16 return request(url)
10 .get(path) 17 .get(path)
11 .query({ start }) 18 .query(query)
12 .query({ count })
13 .query({ sort })
14 .query({ search })
15 .set('Accept', 'application/json') 19 .set('Accept', 'application/json')
16 .expect(200) 20 .expect(200)
17 .expect('Content-Type', /json/) 21 .expect('Content-Type', /json/)
@@ -42,12 +46,16 @@ function rejectFollower (url: string, token: string, follower: string, statusCod
42function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { 46function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) {
43 const path = '/api/v1/server/following' 47 const path = '/api/v1/server/following'
44 48
49 const query = {
50 start,
51 count,
52 sort,
53 search
54 }
55
45 return request(url) 56 return request(url)
46 .get(path) 57 .get(path)
47 .query({ start }) 58 .query(query)
48 .query({ count })
49 .query({ sort })
50 .query({ search })
51 .set('Accept', 'application/json') 59 .set('Accept', 'application/json')
52 .expect(200) 60 .expect(200)
53 .expect('Content-Type', /json/) 61 .expect('Content-Type', /json/)