aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-live-session.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-live-session.ts')
-rw-r--r--server/models/video/video-live-session.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/models/video/video-live-session.ts b/server/models/video/video-live-session.ts
index 836620872..758906a42 100644
--- a/server/models/video/video-live-session.ts
+++ b/server/models/video/video-live-session.ts
@@ -107,6 +107,15 @@ export class VideoLiveSessionModel extends Model<Partial<AttributesOnly<VideoLiv
107 }) 107 })
108 } 108 }
109 109
110 static findLatestSessionOf (videoId: number) {
111 return VideoLiveSessionModel.findOne({
112 where: {
113 liveVideoId: videoId
114 },
115 order: [ [ 'startDate', 'DESC' ] ]
116 })
117 }
118
110 static listSessionsOfLiveForAPI (options: { videoId: number }) { 119 static listSessionsOfLiveForAPI (options: { videoId: number }) {
111 const { videoId } = options 120 const { videoId } = options
112 121