aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/utils/server/stats.ts
blob: 01989d952b8c460fc811fef0f1abd4c68e159207 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { makeGetRequest } from '../'

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
}