aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-05 14:12:57 +0200
committerChocobozzz <me@florianbigard.com>2022-05-05 14:13:14 +0200
commit49f0468d44468528c2fb2c8b0efd19cdaeeec43d (patch)
tree4fd07d5da74506729a1cbbe67548bfd9c6c76849 /shared/server-commands/videos
parentf18a060a83d7053897173b2a24fb7984893131c7 (diff)
downloadPeerTube-49f0468d44468528c2fb2c8b0efd19cdaeeec43d.tar.gz
PeerTube-49f0468d44468528c2fb2c8b0efd19cdaeeec43d.tar.zst
PeerTube-49f0468d44468528c2fb2c8b0efd19cdaeeec43d.zip
Add filter by start/end date overall stats in api
Diffstat (limited to 'shared/server-commands/videos')
-rw-r--r--shared/server-commands/videos/video-stats-command.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared/server-commands/videos/video-stats-command.ts b/shared/server-commands/videos/video-stats-command.ts
index bd4808f63..b9b99bfb5 100644
--- a/shared/server-commands/videos/video-stats-command.ts
+++ b/shared/server-commands/videos/video-stats-command.ts
@@ -6,6 +6,8 @@ export class VideoStatsCommand extends AbstractCommand {
6 6
7 getOverallStats (options: OverrideCommandOptions & { 7 getOverallStats (options: OverrideCommandOptions & {
8 videoId: number | string 8 videoId: number | string
9 startDate?: string
10 endDate?: string
9 }) { 11 }) {
10 const path = '/api/v1/videos/' + options.videoId + '/stats/overall' 12 const path = '/api/v1/videos/' + options.videoId + '/stats/overall'
11 13
@@ -13,6 +15,8 @@ export class VideoStatsCommand extends AbstractCommand {
13 ...options, 15 ...options,
14 path, 16 path,
15 17
18 query: pick(options, [ 'startDate', 'endDate' ]),
19
16 implicitToken: true, 20 implicitToken: true,
17 defaultExpectedStatus: HttpStatusCode.OK_200 21 defaultExpectedStatus: HttpStatusCode.OK_200
18 }) 22 })