From 9639bd175726b73f8fe664b5ced12a72407b1f0b Mon Sep 17 00:00:00 2001 From: buoyantair Date: Mon, 29 Oct 2018 22:18:31 +0530 Subject: Move utils to /shared Move utils used by /server/tools/* & /server/tests/**/* into /shared folder. Issue: #1336 --- shared/utils/overviews/overviews.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 shared/utils/overviews/overviews.ts (limited to 'shared/utils/overviews') diff --git a/shared/utils/overviews/overviews.ts b/shared/utils/overviews/overviews.ts new file mode 100644 index 000000000..23e3ceb1e --- /dev/null +++ b/shared/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