]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Transaction is optional
authorChocobozzz <me@florianbigard.com>
Wed, 9 Jun 2021 15:06:56 +0000 (17:06 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 9 Jun 2021 15:06:56 +0000 (17:06 +0200)
server/models/video/video-caption.ts

index b4918e519f59ba7cf89adb9fc0d9c58e8d2be6b9..bbda0f3eeb60626a7607776df62ae9d913f6f20c 100644 (file)
@@ -154,7 +154,7 @@ export class VideoCaptionModel extends Model<Partial<AttributesOnly<VideoCaption
     return caption.save({ transaction })
   }
 
-  static listVideoCaptions (videoId: number, transaction: Transaction): Promise<MVideoCaptionVideo[]> {
+  static listVideoCaptions (videoId: number, transaction?: Transaction): Promise<MVideoCaptionVideo[]> {
     const query = {
       order: [ [ 'language', 'ASC' ] ] as OrderItem[],
       where: {