]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video.ts
Add getSettings documentation
[github/Chocobozzz/PeerTube.git] / server / models / video / video.ts
index f32216e908c4604d83fd7bc9d2f376bc1fb5bedb..96b96e5ac3a893f461182a9780e02e287f00d551 100644 (file)
@@ -43,7 +43,6 @@ import {
 } from '../../helpers/custom-validators/videos'
 import { getVideoFileResolution } from '../../helpers/ffmpeg-utils'
 import { logger } from '../../helpers/logger'
-import { getServerActor } from '../../helpers/utils'
 import {
   ACTIVITY_PUB,
   API_VERSION,
@@ -126,6 +125,7 @@ import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilena
 import { ModelCache } from '@server/models/model-cache'
 import { buildListQuery, BuildVideosQueryOptions, wrapForAPIResults } from './video-query-builder'
 import { buildNSFWFilter } from '@server/helpers/express-utils'
+import { getServerActor } from '@server/models/application/application'
 
 export enum ScopeNames {
   AVAILABLE_FOR_LIST_IDS = 'AVAILABLE_FOR_LIST_IDS',
@@ -813,10 +813,8 @@ export class VideoModel extends Model<VideoModel> {
     const details = instance.toFormattedDetailsJSON()
 
     for (const abuse of instance.VideoAbuses) {
-      tasks.push((_ => {
-        abuse.deletedVideo = details
-        return abuse.save({ transaction: options.transaction })
-      })())
+      abuse.deletedVideo = details
+      tasks.push(abuse.save({ transaction: options.transaction }))
     }
 
     Promise.all(tasks)