]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-channel.ts
use focus-visible polyfill to improve keyboard navigation
[github/Chocobozzz/PeerTube.git] / server / models / video / video-channel.ts
index 475530daf4f423ede8fc5b8b645d773538fa566d..f4586917e83918eaee7e1a6936449da870cc4f94 100644 (file)
@@ -296,6 +296,12 @@ export class VideoChannelModel extends Model<VideoChannelModel> {
       })
   }
 
+  static loadByIdAndPopulateAccount (id: number) {
+    return VideoChannelModel.unscoped()
+      .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT ])
+      .findById(id)
+  }
+
   static loadByIdAndAccount (id: number, accountId: number) {
     const query = {
       where: {
@@ -304,13 +310,13 @@ export class VideoChannelModel extends Model<VideoChannelModel> {
       }
     }
 
-    return VideoChannelModel
+    return VideoChannelModel.unscoped()
       .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT ])
       .findOne(query)
   }
 
   static loadAndPopulateAccount (id: number) {
-    return VideoChannelModel
+    return VideoChannelModel.unscoped()
       .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT ])
       .findById(id)
   }
@@ -365,7 +371,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> {
       ]
     }
 
-    return VideoChannelModel
+    return VideoChannelModel.unscoped()
       .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT ])
       .findOne(query)
   }
@@ -390,7 +396,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> {
       ]
     }
 
-    return VideoChannelModel
+    return VideoChannelModel.unscoped()
       .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT ])
       .findOne(query)
   }
@@ -402,7 +408,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> {
       ]
     }
 
-    return VideoChannelModel
+    return VideoChannelModel.unscoped()
       .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT, ScopeNames.WITH_VIDEOS ])
       .findById(id, options)
   }