diff options
Diffstat (limited to 'shared/extra-utils/search')
-rw-r--r-- | shared/extra-utils/search/video-channels.ts | 15 |
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 @@ | |||
1 | import { VideoChannelsSearchQuery } from '@shared/models' | ||
1 | import { makeGetRequest } from '../requests/requests' | 2 | import { makeGetRequest } from '../requests/requests' |
2 | 3 | ||
3 | function searchVideoChannel (url: string, search: string, token?: string, statusCodeExpected = 200) { | 4 | function 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 | ||
19 | function 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 | ||
20 | export { | 32 | export { |
21 | searchVideoChannel | 33 | searchVideoChannel, |
34 | advancedVideoChannelSearch | ||
22 | } | 35 | } |