From 1f7ab4f3104df051f2d2cd4ed85ff6092c92efeb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Jan 2018 10:25:56 +0100 Subject: Upgrade server dependencies --- server/lib/activitypub/process/process-create.ts | 2 +- server/lib/activitypub/process/process-update.ts | 3 ++- server/lib/activitypub/videos.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'server/lib/activitypub') 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 ( async function createRates (actorUrls: string[], video: VideoModel, rate: VideoRateType) { let rateCounts = 0 - const tasks: Bluebird[] = [] + const tasks: Bluebird[] = [] for (const actorUrl of actorUrls) { 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' import { ActivityUpdate } from '../../../../shared/models/activitypub' import { ActivityPubActor } from '../../../../shared/models/activitypub/activitypub-actor' import { VideoTorrentObject } from '../../../../shared/models/activitypub/objects' +import { VideoFile } from '../../../../shared/models/videos' import { retryTransactionWrapper } from '../../../helpers/database-utils' import { logger } from '../../../helpers/logger' import { resetSequelizeInstance } from '../../../helpers/utils' @@ -90,7 +91,7 @@ async function updateRemoteVideo (actor: ActorModel, activity: ActivityUpdate) { await Promise.all(videoFileDestroyTasks) const videoFileAttributes = videoFileActivityUrlToDBAttributes(videoInstance, videoAttributesToUpdate) - const tasks: Bluebird[] = videoFileAttributes.map(f => VideoFileModel.create(f)) + const tasks = videoFileAttributes.map(f => VideoFileModel.create(f)) await Promise.all(tasks) 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: throw new Error('Cannot find valid files for video %s ' + videoObject.url) } - const tasks: Bluebird[] = videoFileAttributes.map(f => VideoFileModel.create(f, { transaction: t })) + const tasks = videoFileAttributes.map(f => VideoFileModel.create(f, { transaction: t })) await Promise.all(tasks) const tags = videoObject.tag.map(t => t.name) -- cgit v1.2.3