diff options
Diffstat (limited to 'shared/extra-utils/search/video-channels.ts')
-rw-r--r-- | shared/extra-utils/search/video-channels.ts | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/shared/extra-utils/search/video-channels.ts b/shared/extra-utils/search/video-channels.ts deleted file mode 100644 index 8e0f42578..000000000 --- a/shared/extra-utils/search/video-channels.ts +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | import { VideoChannelsSearchQuery } from '@shared/models' | ||
2 | import { makeGetRequest } from '../requests/requests' | ||
3 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
4 | |||
5 | function searchVideoChannel (url: string, search: string, token?: string, statusCodeExpected = HttpStatusCode.OK_200) { | ||
6 | const path = '/api/v1/search/video-channels' | ||
7 | |||
8 | return makeGetRequest({ | ||
9 | url, | ||
10 | path, | ||
11 | query: { | ||
12 | sort: '-createdAt', | ||
13 | search | ||
14 | }, | ||
15 | token, | ||
16 | statusCodeExpected | ||
17 | }) | ||
18 | } | ||
19 | |||
20 | function advancedVideoChannelSearch (url: string, search: VideoChannelsSearchQuery) { | ||
21 | const path = '/api/v1/search/video-channels' | ||
22 | |||
23 | return makeGetRequest({ | ||
24 | url, | ||
25 | path, | ||
26 | query: search, | ||
27 | statusCodeExpected: HttpStatusCode.OK_200 | ||
28 | }) | ||
29 | } | ||
30 | |||
31 | // --------------------------------------------------------------------------- | ||
32 | |||
33 | export { | ||
34 | searchVideoChannel, | ||
35 | advancedVideoChannelSearch | ||
36 | } | ||