aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-blacklist.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-11 16:01:56 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-11 16:01:56 +0200
commit0a6658fdcbd779ada8f3758048c326e997902d5a (patch)
tree5de40bf901db0299011104b1344783637b964eb0 /server/models/video/video-blacklist.ts
parente6d4b0ff2404dcf0b3a755c3fcc415ffeb6e754d (diff)
downloadPeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.tar.gz
PeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.tar.zst
PeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.zip
Use global uuid instead of remoteId for videos
Diffstat (limited to 'server/models/video/video-blacklist.ts')
-rw-r--r--server/models/video/video-blacklist.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/models/video/video-blacklist.ts b/server/models/video/video-blacklist.ts
index 8c42dbc21..4d1b45aa5 100644
--- a/server/models/video/video-blacklist.ts
+++ b/server/models/video/video-blacklist.ts
@@ -60,8 +60,11 @@ toFormatedJSON = function (this: BlacklistedVideoInstance) {
60 60
61function associate (models) { 61function associate (models) {
62 BlacklistedVideo.belongsTo(models.Video, { 62 BlacklistedVideo.belongsTo(models.Video, {
63 foreignKey: 'videoId', 63 foreignKey: {
64 onDelete: 'cascade' 64 name: 'videoId',
65 allowNull: false
66 },
67 onDelete: 'CASCADE'
65 }) 68 })
66} 69}
67 70
@@ -92,7 +95,7 @@ loadById = function (id: number) {
92 return BlacklistedVideo.findById(id) 95 return BlacklistedVideo.findById(id)
93} 96}
94 97
95loadByVideoId = function (id: string) { 98loadByVideoId = function (id: number) {
96 const query = { 99 const query = {
97 where: { 100 where: {
98 videoId: id 101 videoId: id