]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video.ts
Implement video comment list in admin
[github/Chocobozzz/PeerTube.git] / server / models / video / video.ts
index 70839aa892beed467f4a999c6ee0fb9167e1c9c6..f3055a494a4fab81de5c5e73555ff9723631785c 100644 (file)
@@ -988,6 +988,19 @@ export class VideoModel extends Model<VideoModel> {
     })
   }
 
+  static listPublishedLiveIds () {
+    const options = {
+      attributes: [ 'id' ],
+      where: {
+        isLive: true,
+        state: VideoState.PUBLISHED
+      }
+    }
+
+    return VideoModel.findAll(options)
+      .map(v => v.id)
+  }
+
   static listUserVideosForApi (
     accountId: number,
     start: number,