X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-caption.ts;h=b4f17b481c8320dcc1e42ec6b801cf609621e47f;hb=418d092afa81e2c8fe8ac6838fc4b5eb0af6a782;hp=10ef46c14ebac2cd87a599fc106e11013413ae9e;hpb=62689b942b71cd1dd0d050c6ed05f884a0b325c2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-caption.ts b/server/models/video/video-caption.ts index 10ef46c14..b4f17b481 100644 --- a/server/models/video/video-caption.ts +++ b/server/models/video/video-caption.ts @@ -120,7 +120,8 @@ export class VideoCaptionModel extends Model { language } - return VideoCaptionModel.upsert(values, { transaction }) + return VideoCaptionModel.upsert(values, { transaction, returning: true }) + .then(([ caption ]) => caption) } static listVideoCaptions (videoId: number) {