mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Support video views/viewers stats in server
* Add "currentTime" and "event" body params to view endpoint * Merge watching and view endpoints * Introduce WatchAction AP activity * Add tables to store viewer information of local videos * Add endpoints to fetch video views/viewers stats of local videos * Refactor views/viewers handlers * Support "views" and "viewers" counters for both VOD and live videos
This commit is contained in:
parent
69d48ee30c
commit
b211106695
108 changed files with 2834 additions and 655 deletions
4
server/middlewares/cache/shared/api-cache.ts
vendored
4
server/middlewares/cache/shared/api-cache.ts
vendored
|
@ -6,8 +6,8 @@ import { OutgoingHttpHeaders } from 'http'
|
|||
import { isTestInstance, parseDurationToMs } from '@server/helpers/core-utils'
|
||||
import { logger } from '@server/helpers/logger'
|
||||
import { Redis } from '@server/lib/redis'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
import { asyncMiddleware } from '@server/middlewares'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
export interface APICacheOptions {
|
||||
headerBlacklist?: string[]
|
||||
|
@ -152,7 +152,7 @@ export class ApiCache {
|
|||
end: res.end,
|
||||
cacheable: true,
|
||||
content: undefined,
|
||||
headers: {}
|
||||
headers: undefined
|
||||
}
|
||||
|
||||
// Patch express
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue