aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/overviews/overviews.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-12-07 14:32:36 +0100
committerGitHub <noreply@github.com>2020-12-07 14:32:36 +0100
commit2d53be0267acc49cda46707b885096193a1f4e9c (patch)
tree887061a34bc67f40acbb96a6278f9544bf83caeb /shared/extra-utils/overviews/overviews.ts
parentadc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff)
downloadPeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.gz
PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.zst
PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.zip
replace numbers with typed http status codes (#3409)
Diffstat (limited to 'shared/extra-utils/overviews/overviews.ts')
-rw-r--r--shared/extra-utils/overviews/overviews.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/extra-utils/overviews/overviews.ts b/shared/extra-utils/overviews/overviews.ts
index ae4d31aa3..5e1a13e5e 100644
--- a/shared/extra-utils/overviews/overviews.ts
+++ b/shared/extra-utils/overviews/overviews.ts
@@ -1,6 +1,7 @@
1import { makeGetRequest } from '../requests/requests' 1import { makeGetRequest } from '../requests/requests'
2import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
2 3
3function getVideosOverview (url: string, page: number, statusCodeExpected = 200) { 4function getVideosOverview (url: string, page: number, statusCodeExpected = HttpStatusCode.OK_200) {
4 const path = '/api/v1/overviews/videos' 5 const path = '/api/v1/overviews/videos'
5 6
6 const query = { page } 7 const query = { page }
@@ -13,7 +14,7 @@ function getVideosOverview (url: string, page: number, statusCodeExpected = 200)
13 }) 14 })
14} 15}
15 16
16function getVideosOverviewWithToken (url: string, page: number, token: string, statusCodeExpected = 200) { 17function getVideosOverviewWithToken (url: string, page: number, token: string, statusCodeExpected = HttpStatusCode.OK_200) {
17 const path = '/api/v1/overviews/videos' 18 const path = '/api/v1/overviews/videos'
18 19
19 const query = { page } 20 const query = { page }