diff options
Diffstat (limited to 'server/lib/activitypub/process-add.ts')
-rw-r--r-- | server/lib/activitypub/process-add.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/lib/activitypub/process-add.ts b/server/lib/activitypub/process-add.ts index 06d23a2ea..98e414dbb 100644 --- a/server/lib/activitypub/process-add.ts +++ b/server/lib/activitypub/process-add.ts | |||
@@ -39,7 +39,7 @@ function processAddVideo (account: AccountInstance, videoChannelUrl: string, vid | |||
39 | async function addRemoteVideo (account: AccountInstance, videoChannelUrl: string, videoToCreateData: VideoTorrentObject) { | 39 | async function addRemoteVideo (account: AccountInstance, videoChannelUrl: string, videoToCreateData: VideoTorrentObject) { |
40 | logger.debug('Adding remote video %s.', videoToCreateData.url) | 40 | logger.debug('Adding remote video %s.', videoToCreateData.url) |
41 | 41 | ||
42 | await db.sequelize.transaction(async t => { | 42 | return db.sequelize.transaction(async t => { |
43 | const sequelizeOptions = { | 43 | const sequelizeOptions = { |
44 | transaction: t | 44 | transaction: t |
45 | } | 45 | } |
@@ -66,7 +66,10 @@ async function addRemoteVideo (account: AccountInstance, videoChannelUrl: string | |||
66 | const tags = videoToCreateData.tag.map(t => t.name) | 66 | const tags = videoToCreateData.tag.map(t => t.name) |
67 | const tagInstances = await db.Tag.findOrCreateTags(tags, t) | 67 | const tagInstances = await db.Tag.findOrCreateTags(tags, t) |
68 | await videoCreated.setTags(tagInstances, sequelizeOptions) | 68 | await videoCreated.setTags(tagInstances, sequelizeOptions) |
69 | |||
70 | logger.info('Remote video with uuid %s inserted.', videoToCreateData.uuid) | ||
71 | |||
72 | return videoCreated | ||
69 | }) | 73 | }) |
70 | 74 | ||
71 | logger.info('Remote video with uuid %s inserted.', videoToCreateData.uuid) | ||
72 | } | 75 | } |