Use inner join and document code for viewr stats for channels

This commit is contained in:
Rigel Kent
2020-03-30 12:06:46 +02:00
committed by Chocobozzz
parent 714bfcc556
commit 3d527ba173
8 changed files with 70 additions and 45 deletions

View File

@@ -2,7 +2,7 @@ import { Actor } from '../../actors/actor.model'
import { Account } from '../../actors/index'
import { Avatar } from '../../avatars'
export type viewsPerTime = {
export type ViewsPerDate = {
date: Date
views: number
}
@@ -13,7 +13,7 @@ export interface VideoChannel extends Actor {
support: string
isLocal: boolean
ownerAccount?: Account
viewsPerDay?: viewsPerTime[] // chronologically ordered
viewsPerDay?: ViewsPerDate[] // chronologically ordered
}
export interface VideoChannelSummary {