mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Add subdivision to viewer stats
This commit is contained in:
parent
4437ae0fd3
commit
4cbea51255
18 changed files with 243 additions and 61 deletions
|
@ -26,8 +26,12 @@ export {
|
|||
|
||||
function isLocationValid (location: any) {
|
||||
if (!location) return true
|
||||
if (typeof location !== 'object') return false
|
||||
|
||||
return typeof location === 'object' && typeof location.addressCountry === 'string'
|
||||
if (location.addressCountry && typeof location.addressCountry !== 'string') return false
|
||||
if (location.addressRegion && typeof location.addressRegion !== 'string') return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
function isWatchSectionsValid (sections: WatchActionObject['watchSections']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue