aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/extra-utils/overviews/overviews.ts
blob: ae4d31aa349b819ec983a3f96eb54ed1ea50b12d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                                                     
                                                                                  

                                         
                        




                         
                      


    

















                                                                                                          
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
}