diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-01-04 20:59:23 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-01-04 21:05:13 +0100 |
commit | 55fa55a9be566cca2ba95322f2ae23b434aed62a (patch) | |
tree | f51ef35c120ce8a928917a659418079538cdb8dc /server/models/video.js | |
parent | a6fd2b30bf717eec14972a2175354781f5f43e77 (diff) | |
download | PeerTube-55fa55a9be566cca2ba95322f2ae23b434aed62a.tar.gz PeerTube-55fa55a9be566cca2ba95322f2ae23b434aed62a.tar.zst PeerTube-55fa55a9be566cca2ba95322f2ae23b434aed62a.zip |
Server: add video abuse support
Diffstat (limited to 'server/models/video.js')
-rw-r--r-- | server/models/video.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/models/video.js b/server/models/video.js index 3fe8368c7..4c197a835 100644 --- a/server/models/video.js +++ b/server/models/video.js | |||
@@ -248,6 +248,14 @@ function associate (models) { | |||
248 | through: models.VideoTag, | 248 | through: models.VideoTag, |
249 | onDelete: 'cascade' | 249 | onDelete: 'cascade' |
250 | }) | 250 | }) |
251 | |||
252 | this.hasMany(models.VideoAbuse, { | ||
253 | foreignKey: { | ||
254 | name: 'videoId', | ||
255 | allowNull: false | ||
256 | }, | ||
257 | onDelete: 'cascade' | ||
258 | }) | ||
251 | } | 259 | } |
252 | 260 | ||
253 | function generateMagnetUri () { | 261 | function generateMagnetUri () { |