aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-06-10 10:58:44 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-06-10 14:02:41 +0200
commit3521ab8fc01da85fa804439ca6e297e6fb364c58 (patch)
tree70db4fc628c85d145d59efafbefec9093e9eebac /shared
parent3b0bd70aa05ab82fa30fe67ed4899d44652c703a (diff)
downloadPeerTube-3521ab8fc01da85fa804439ca6e297e6fb364c58.tar.gz
PeerTube-3521ab8fc01da85fa804439ca6e297e6fb364c58.tar.zst
PeerTube-3521ab8fc01da85fa804439ca6e297e6fb364c58.zip
Add search index tests
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/search/video-channels.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/shared/extra-utils/search/video-channels.ts b/shared/extra-utils/search/video-channels.ts
index 0532134ae..d16210530 100644
--- a/shared/extra-utils/search/video-channels.ts
+++ b/shared/extra-utils/search/video-channels.ts
@@ -1,3 +1,4 @@
1import { VideoChannelsSearchQuery } from '@shared/models'
1import { makeGetRequest } from '../requests/requests' 2import { makeGetRequest } from '../requests/requests'
2 3
3function searchVideoChannel (url: string, search: string, token?: string, statusCodeExpected = 200) { 4function searchVideoChannel (url: string, search: string, token?: string, statusCodeExpected = 200) {
@@ -15,8 +16,20 @@ function searchVideoChannel (url: string, search: string, token?: string, status
15 }) 16 })
16} 17}
17 18
19function advancedVideoChannelSearch (url: string, search: VideoChannelsSearchQuery) {
20 const path = '/api/v1/search/video-channels'
21
22 return makeGetRequest({
23 url,
24 path,
25 query: search,
26 statusCodeExpected: 200
27 })
28}
29
18// --------------------------------------------------------------------------- 30// ---------------------------------------------------------------------------
19 31
20export { 32export {
21 searchVideoChannel 33 searchVideoChannel,
34 advancedVideoChannelSearch
22} 35}