diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 16:31:24 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 16:31:24 +0100 |
commit | 53abc4c272be9ecc951274458d054dbaf86e594d (patch) | |
tree | 5d69eca59cf3b51c95ecad190f8cdb058ab9e3f7 /server/initializers | |
parent | 604e02abcba0a50be23f243db30eca94b68cd35f (diff) | |
download | PeerTube-53abc4c272be9ecc951274458d054dbaf86e594d.tar.gz PeerTube-53abc4c272be9ecc951274458d054dbaf86e594d.tar.zst PeerTube-53abc4c272be9ecc951274458d054dbaf86e594d.zip |
Upgrade server packages
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/migrations/0080-video-channels.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/initializers/migrations/0080-video-channels.ts b/server/initializers/migrations/0080-video-channels.ts index fc55ef3a2..f19721517 100644 --- a/server/initializers/migrations/0080-video-channels.ts +++ b/server/initializers/migrations/0080-video-channels.ts | |||
@@ -34,7 +34,7 @@ async function up (utils: { | |||
34 | // Create one author per user that does not already exist | 34 | // Create one author per user that does not already exist |
35 | const users = await utils.db.User.findAll() | 35 | const users = await utils.db.User.findAll() |
36 | for (const user of users) { | 36 | for (const user of users) { |
37 | const author = await utils.db.Author.find({ where: { userId: user.id }}) | 37 | const author = await utils.db.Author.find({ where: { userId: user.id } }) |
38 | if (!author) { | 38 | if (!author) { |
39 | await utils.db.Author.create({ | 39 | await utils.db.Author.create({ |
40 | name: user.username, | 40 | name: user.username, |
@@ -72,7 +72,7 @@ async function up (utils: { | |||
72 | const rawVideos = await utils.sequelize.query(query, options) | 72 | const rawVideos = await utils.sequelize.query(query, options) |
73 | 73 | ||
74 | for (const rawVideo of rawVideos) { | 74 | for (const rawVideo of rawVideos) { |
75 | const videoChannel = await utils.db.VideoChannel.findOne({ where: { authorId: rawVideo.authorId }}) | 75 | const videoChannel = await utils.db.VideoChannel.findOne({ where: { authorId: rawVideo.authorId } }) |
76 | 76 | ||
77 | const video = await utils.db.Video.findById(rawVideo.id) | 77 | const video = await utils.db.Video.findById(rawVideo.id) |
78 | video.channelId = videoChannel.id | 78 | video.channelId = videoChannel.id |