mirror of https://github.com/Chocobozzz/PeerTube
17 lines
387 B
TypeScript
17 lines
387 B
TypeScript
import { VideoStatsTimeserieMetric } from '@shared/models'
|
|
|
|
const validMetrics = new Set<VideoStatsTimeserieMetric>([
|
|
'viewers',
|
|
'aggregateWatchTime'
|
|
])
|
|
|
|
function isValidStatTimeserieMetric (value: VideoStatsTimeserieMetric) {
|
|
return validMetrics.has(value)
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export {
|
|
isValidStatTimeserieMetric
|
|
}
|