aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/utils/server/stats.ts
blob: 6f079ad189c70c7cd9e0857c8617d0ae3ecc4e26 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                     
 
                                                   

                                     



                                                  


                         
          








                                                                              
import { makeGetRequest } from '../requests/requests'

function getStats (url: string, useCache = false) {
  const path = '/api/v1/server/stats'

  const query = {
    t: useCache ? undefined : new Date().getTime()
  }

  return makeGetRequest({
    url,
    path,
    query,
    statusCodeExpected: 200
  })
}

// ---------------------------------------------------------------------------

export {
  getStats
}