aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-04-20 11:20:12 +0200
committerRigel Kent <par@rigelk.eu>2020-05-01 16:41:02 +0200
commit0251197e249cc03b65805ed6805da72bf4573529 (patch)
tree3aae202fd1ea24bac5cd7f2c380ffe50aae189a0 /server/models/video/video.ts
parentb8cf27c0f86d205a279d03b83e0e6728f46da67f (diff)
downloadPeerTube-0251197e249cc03b65805ed6805da72bf4573529.tar.gz
PeerTube-0251197e249cc03b65805ed6805da72bf4573529.tar.zst
PeerTube-0251197e249cc03b65805ed6805da72bf4573529.zip
Factorize rest-table and fix/simplify SQL
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index f32216e90..ccb9d64ca 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -813,10 +813,8 @@ export class VideoModel extends Model<VideoModel> {
813 const details = instance.toFormattedDetailsJSON() 813 const details = instance.toFormattedDetailsJSON()
814 814
815 for (const abuse of instance.VideoAbuses) { 815 for (const abuse of instance.VideoAbuses) {
816 tasks.push((_ => { 816 abuse.deletedVideo = details
817 abuse.deletedVideo = details 817 tasks.push(abuse.save({ transaction: options.transaction }))
818 return abuse.save({ transaction: options.transaction })
819 })())
820 } 818 }
821 819
822 Promise.all(tasks) 820 Promise.all(tasks)