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/overviews/overviews.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 shared/extra-utils/overviews/overviews.ts (limited to 'shared/extra-utils/overviews') diff --git a/shared/extra-utils/overviews/overviews.ts b/shared/extra-utils/overviews/overviews.ts new file mode 100644 index 000000000..23e3ceb1e --- /dev/null +++ b/shared/extra-utils/overviews/overviews.ts @@ -0,0 +1,18 @@ +import { makeGetRequest } from '../requests/requests' + +function getVideosOverview (url: string, useCache = false) { + const path = '/api/v1/overviews/videos' + + const query = { + t: useCache ? undefined : new Date().getTime() + } + + return makeGetRequest({ + url, + path, + query, + statusCodeExpected: 200 + }) +} + +export { getVideosOverview } -- cgit v1.2.3