1
0
Fork 0
peertube/shared/extra-utils/server/stats.ts
Chocobozzz 94565d52bb
Shared utils -> extra-utils
Because they need dev dependencies
2019-04-24 16:25:52 +02:00

22 lines
414 B
TypeScript

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
}