aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/search/video-channels.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/search/video-channels.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/search/video-channels.ts')
-rw-r--r--shared/extra-utils/search/video-channels.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/extra-utils/search/video-channels.ts b/shared/extra-utils/search/video-channels.ts
index d16210530..8e0f42578 100644
--- a/shared/extra-utils/search/video-channels.ts
+++ b/shared/extra-utils/search/video-channels.ts
@@ -1,7 +1,8 @@
1import { VideoChannelsSearchQuery } from '@shared/models' 1import { VideoChannelsSearchQuery } from '@shared/models'
2import { makeGetRequest } from '../requests/requests' 2import { makeGetRequest } from '../requests/requests'
3import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
3 4
4function searchVideoChannel (url: string, search: string, token?: string, statusCodeExpected = 200) { 5function searchVideoChannel (url: string, search: string, token?: string, statusCodeExpected = HttpStatusCode.OK_200) {
5 const path = '/api/v1/search/video-channels' 6 const path = '/api/v1/search/video-channels'
6 7
7 return makeGetRequest({ 8 return makeGetRequest({
@@ -23,7 +24,7 @@ function advancedVideoChannelSearch (url: string, search: VideoChannelsSearchQue
23 url, 24 url,
24 path, 25 path,
25 query: search, 26 query: search,
26 statusCodeExpected: 200 27 statusCodeExpected: HttpStatusCode.OK_200
27 }) 28 })
28} 29}
29 30