aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-30 16:24:25 +0200
committerChocobozzz <me@florianbigard.com>2021-09-01 15:06:46 +0200
commit3419e0e1fe8e48a08b63ca0ded31087f913eb2b6 (patch)
tree63ac7190b79194e93aec9bbfd3c336e60f469e9d /server
parent2a4c9669d2d6ac6cd4ae43544698f826ae98080f (diff)
downloadPeerTube-3419e0e1fe8e48a08b63ca0ded31087f913eb2b6.tar.gz
PeerTube-3419e0e1fe8e48a08b63ca0ded31087f913eb2b6.tar.zst
PeerTube-3419e0e1fe8e48a08b63ca0ded31087f913eb2b6.zip
Migrate to webdriverio
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/videos/upload.ts6
-rw-r--r--server/models/video/video-channel.ts2
2 files changed, 4 insertions, 4 deletions
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: {
197 }, sequelizeOptions) 197 }, sequelizeOptions)
198 } 198 }
199 199
200 // Channel has a new content, set as updated
201 await videoCreated.VideoChannel.setAsUpdated(t)
202
203 await autoBlacklistVideoIfNeeded({ 200 await autoBlacklistVideoIfNeeded({
204 video, 201 video,
205 user, 202 user,
@@ -214,6 +211,9 @@ async function addVideo (options: {
214 return { videoCreated } 211 return { videoCreated }
215 }) 212 })
216 213
214 // Channel has a new content, set as updated
215 await videoCreated.VideoChannel.setAsUpdated()
216
217 createTorrentFederate(video, videoFile) 217 createTorrentFederate(video, videoFile)
218 .then(() => { 218 .then(() => {
219 if (video.state === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE) { 219 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"`
753 return this.Actor.isOutdated() 753 return this.Actor.isOutdated()
754 } 754 }
755 755
756 setAsUpdated (transaction: Transaction) { 756 setAsUpdated (transaction?: Transaction) {
757 return setAsUpdated('videoChannel', this.id, transaction) 757 return setAsUpdated('videoChannel', this.id, transaction)
758 } 758 }
759} 759}