diff options
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/process/process-create.ts | 2 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-update.ts | 3 | ||||
-rw-r--r-- | server/lib/activitypub/videos.ts | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts index 442cd5c0b..eff796c1d 100644 --- a/server/lib/activitypub/process/process-create.ts +++ b/server/lib/activitypub/process/process-create.ts | |||
@@ -79,7 +79,7 @@ async function processCreateVideo ( | |||
79 | 79 | ||
80 | async function createRates (actorUrls: string[], video: VideoModel, rate: VideoRateType) { | 80 | async function createRates (actorUrls: string[], video: VideoModel, rate: VideoRateType) { |
81 | let rateCounts = 0 | 81 | let rateCounts = 0 |
82 | const tasks: Bluebird<any>[] = [] | 82 | const tasks: Bluebird<number>[] = [] |
83 | 83 | ||
84 | for (const actorUrl of actorUrls) { | 84 | for (const actorUrl of actorUrls) { |
85 | const actor = await getOrCreateActorAndServerAndModel(actorUrl) | 85 | const actor = await getOrCreateActorAndServerAndModel(actorUrl) |
diff --git a/server/lib/activitypub/process/process-update.ts b/server/lib/activitypub/process/process-update.ts index 5439a47f2..b5c97e515 100644 --- a/server/lib/activitypub/process/process-update.ts +++ b/server/lib/activitypub/process/process-update.ts | |||
@@ -2,6 +2,7 @@ import * as Bluebird from 'bluebird' | |||
2 | import { ActivityUpdate } from '../../../../shared/models/activitypub' | 2 | import { ActivityUpdate } from '../../../../shared/models/activitypub' |
3 | import { ActivityPubActor } from '../../../../shared/models/activitypub/activitypub-actor' | 3 | import { ActivityPubActor } from '../../../../shared/models/activitypub/activitypub-actor' |
4 | import { VideoTorrentObject } from '../../../../shared/models/activitypub/objects' | 4 | import { VideoTorrentObject } from '../../../../shared/models/activitypub/objects' |
5 | import { VideoFile } from '../../../../shared/models/videos' | ||
5 | import { retryTransactionWrapper } from '../../../helpers/database-utils' | 6 | import { retryTransactionWrapper } from '../../../helpers/database-utils' |
6 | import { logger } from '../../../helpers/logger' | 7 | import { logger } from '../../../helpers/logger' |
7 | import { resetSequelizeInstance } from '../../../helpers/utils' | 8 | import { resetSequelizeInstance } from '../../../helpers/utils' |
@@ -90,7 +91,7 @@ async function updateRemoteVideo (actor: ActorModel, activity: ActivityUpdate) { | |||
90 | await Promise.all(videoFileDestroyTasks) | 91 | await Promise.all(videoFileDestroyTasks) |
91 | 92 | ||
92 | const videoFileAttributes = videoFileActivityUrlToDBAttributes(videoInstance, videoAttributesToUpdate) | 93 | const videoFileAttributes = videoFileActivityUrlToDBAttributes(videoInstance, videoAttributesToUpdate) |
93 | const tasks: Bluebird<any>[] = videoFileAttributes.map(f => VideoFileModel.create(f)) | 94 | const tasks = videoFileAttributes.map(f => VideoFileModel.create(f)) |
94 | await Promise.all(tasks) | 95 | await Promise.all(tasks) |
95 | 96 | ||
96 | const tags = videoAttributesToUpdate.tag.map(t => t.name) | 97 | const tags = videoAttributesToUpdate.tag.map(t => t.name) |
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index 1d2d46cbc..263c2629c 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts | |||
@@ -163,7 +163,7 @@ async function getOrCreateVideo (videoObject: VideoTorrentObject, channelActor: | |||
163 | throw new Error('Cannot find valid files for video %s ' + videoObject.url) | 163 | throw new Error('Cannot find valid files for video %s ' + videoObject.url) |
164 | } | 164 | } |
165 | 165 | ||
166 | const tasks: Bluebird<any>[] = videoFileAttributes.map(f => VideoFileModel.create(f, { transaction: t })) | 166 | const tasks = videoFileAttributes.map(f => VideoFileModel.create(f, { transaction: t })) |
167 | await Promise.all(tasks) | 167 | await Promise.all(tasks) |
168 | 168 | ||
169 | const tags = videoObject.tag.map(t => t.name) | 169 | const tags = videoObject.tag.map(t => t.name) |