From af971e06c620bd46a5aa64c8833364e7022b5e3d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 6 Jul 2021 15:22:51 +0200 Subject: Introduce search command --- shared/extra-utils/search/video-channels.ts | 36 ----------------------------- 1 file changed, 36 deletions(-) delete mode 100644 shared/extra-utils/search/video-channels.ts (limited to 'shared/extra-utils/search/video-channels.ts') 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 @@ -import { VideoChannelsSearchQuery } from '@shared/models' -import { makeGetRequest } from '../requests/requests' -import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' - -function searchVideoChannel (url: string, search: string, token?: string, statusCodeExpected = HttpStatusCode.OK_200) { - const path = '/api/v1/search/video-channels' - - return makeGetRequest({ - url, - path, - query: { - sort: '-createdAt', - search - }, - token, - statusCodeExpected - }) -} - -function advancedVideoChannelSearch (url: string, search: VideoChannelsSearchQuery) { - const path = '/api/v1/search/video-channels' - - return makeGetRequest({ - url, - path, - query: search, - statusCodeExpected: HttpStatusCode.OK_200 - }) -} - -// --------------------------------------------------------------------------- - -export { - searchVideoChannel, - advancedVideoChannelSearch -} -- cgit v1.2.3