1
0
Fork 0
peertube/shared/extra-utils/overviews/overviews.ts
2020-03-11 15:02:20 +01:00

33 lines
629 B
TypeScript

import { makeGetRequest } from '../requests/requests'
function getVideosOverview (url: string, page: number, statusCodeExpected = 200) {
const path = '/api/v1/overviews/videos'
const query = { page }
return makeGetRequest({
url,
path,
query,
statusCodeExpected
})
}
function getVideosOverviewWithToken (url: string, page: number, token: string, statusCodeExpected = 200) {
const path = '/api/v1/overviews/videos'
const query = { page }
return makeGetRequest({
url,
path,
query,
token,
statusCodeExpected
})
}
export {
getVideosOverview,
getVideosOverviewWithToken
}