diff options
Diffstat (limited to 'server/initializers/migrations')
-rw-r--r-- | server/initializers/migrations/0100-activitypub.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/initializers/migrations/0100-activitypub.ts b/server/initializers/migrations/0100-activitypub.ts index 05fd37406..49309286c 100644 --- a/server/initializers/migrations/0100-activitypub.ts +++ b/server/initializers/migrations/0100-activitypub.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { createPrivateAndPublicKeys } from '../../helpers/peertube-crypto' | 2 | import { createPrivateAndPublicKeys } from '../../helpers/peertube-crypto' |
3 | import { shareVideoByServerAndChannel } from '../../lib/activitypub/share' | 3 | import { shareVideoByServerAndChannel } from '../../lib/activitypub/share' |
4 | import { getVideoActivityPubUrl, getVideoChannelActivityPubUrl } from '../../lib/activitypub/url' | 4 | import { getLocalVideoActivityPubUrl, getLocalVideoChannelActivityPubUrl } from '../../lib/activitypub/url' |
5 | import { createLocalAccountWithoutKeys } from '../../lib/user' | 5 | import { createLocalAccountWithoutKeys } from '../../lib/user' |
6 | import { ApplicationModel } from '../../models/application/application' | 6 | import { ApplicationModel } from '../../models/application/application' |
7 | import { SERVER_ACTOR_NAME } from '../constants' | 7 | import { SERVER_ACTOR_NAME } from '../constants' |
@@ -132,7 +132,7 @@ async function up (utils: { | |||
132 | 132 | ||
133 | const videos = await db.Video.findAll() | 133 | const videos = await db.Video.findAll() |
134 | for (const video of videos) { | 134 | for (const video of videos) { |
135 | video.url = getVideoActivityPubUrl(video) | 135 | video.url = getLocalVideoActivityPubUrl(video) |
136 | await video.save() | 136 | await video.save() |
137 | } | 137 | } |
138 | 138 | ||
@@ -151,7 +151,7 @@ async function up (utils: { | |||
151 | 151 | ||
152 | const videoChannels = await db.VideoChannel.findAll() | 152 | const videoChannels = await db.VideoChannel.findAll() |
153 | for (const videoChannel of videoChannels) { | 153 | for (const videoChannel of videoChannels) { |
154 | videoChannel.url = getVideoChannelActivityPubUrl(videoChannel) | 154 | videoChannel.url = getLocalVideoChannelActivityPubUrl(videoChannel) |
155 | await videoChannel.save() | 155 | await videoChannel.save() |
156 | } | 156 | } |
157 | 157 | ||