From 3419e0e1fe8e48a08b63ca0ded31087f913eb2b6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 30 Aug 2021 16:24:25 +0200 Subject: Migrate to webdriverio --- server/controllers/api/videos/upload.ts | 6 +++--- server/models/video/video-channel.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server') diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts index 7ffda749d..7e87df8b1 100644 --- a/server/controllers/api/videos/upload.ts +++ b/server/controllers/api/videos/upload.ts @@ -197,9 +197,6 @@ async function addVideo (options: { }, sequelizeOptions) } - // Channel has a new content, set as updated - await videoCreated.VideoChannel.setAsUpdated(t) - await autoBlacklistVideoIfNeeded({ video, user, @@ -214,6 +211,9 @@ async function addVideo (options: { return { videoCreated } }) + // Channel has a new content, set as updated + await videoCreated.VideoChannel.setAsUpdated() + createTorrentFederate(video, videoFile) .then(() => { if (video.state === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE) { diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 278149d60..c04bd4355 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -753,7 +753,7 @@ ON "Account->Actor"."serverId" = "Account->Actor->Server"."id"` return this.Actor.isOutdated() } - setAsUpdated (transaction: Transaction) { + setAsUpdated (transaction?: Transaction) { return setAsUpdated('videoChannel', this.id, transaction) } } -- cgit v1.2.3