From 94565d52bb2883e09f16d1363170ac9c0dccb7a1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 15 Apr 2019 15:26:15 +0200 Subject: Shared utils -> extra-utils Because they need dev dependencies --- shared/extra-utils/search/video-channels.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create 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 new file mode 100644 index 000000000..0532134ae --- /dev/null +++ b/shared/extra-utils/search/video-channels.ts @@ -0,0 +1,22 @@ +import { makeGetRequest } from '../requests/requests' + +function searchVideoChannel (url: string, search: string, token?: string, statusCodeExpected = 200) { + const path = '/api/v1/search/video-channels' + + return makeGetRequest({ + url, + path, + query: { + sort: '-createdAt', + search + }, + token, + statusCodeExpected + }) +} + +// --------------------------------------------------------------------------- + +export { + searchVideoChannel +} -- cgit v1.2.3