diff options
Diffstat (limited to 'shared/extra-utils/overviews/overviews.ts')
-rw-r--r-- | shared/extra-utils/overviews/overviews.ts | 18 |
1 files changed, 18 insertions, 0 deletions
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 @@ | |||
1 | import { makeGetRequest } from '../requests/requests' | ||
2 | |||
3 | function getVideosOverview (url: string, useCache = false) { | ||
4 | const path = '/api/v1/overviews/videos' | ||
5 | |||
6 | const query = { | ||
7 | t: useCache ? undefined : new Date().getTime() | ||
8 | } | ||
9 | |||
10 | return makeGetRequest({ | ||
11 | url, | ||
12 | path, | ||
13 | query, | ||
14 | statusCodeExpected: 200 | ||
15 | }) | ||
16 | } | ||
17 | |||
18 | export { getVideosOverview } | ||