aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/author.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-09-05 22:09:16 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-09-05 22:09:16 +0200
commit5c98d3bf078852043cbdd582c01e3dc4f4b5b79f (patch)
tree303d57ecc3c5d7b73cbbeb7187986a3dab87bcf0 /server/models/video/author.ts
parent8094a8980265a0a28e508dbd7cf7c7029e6d98b6 (diff)
downloadPeerTube-5c98d3bf078852043cbdd582c01e3dc4f4b5b79f.tar.gz
PeerTube-5c98d3bf078852043cbdd582c01e3dc4f4b5b79f.tar.zst
PeerTube-5c98d3bf078852043cbdd582c01e3dc4f4b5b79f.zip
Begin tests for user quota
Diffstat (limited to 'server/models/video/author.ts')
-rw-r--r--server/models/video/author.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/models/video/author.ts b/server/models/video/author.ts
index c30cc306d..fd0f44f6b 100644
--- a/server/models/video/author.ts
+++ b/server/models/video/author.ts
@@ -71,6 +71,14 @@ function associate (models) {
71 }, 71 },
72 onDelete: 'cascade' 72 onDelete: 'cascade'
73 }) 73 })
74
75 Author.hasMany(models.Video, {
76 foreignKey: {
77 name: 'authorId',
78 allowNull: false
79 },
80 onDelete: 'cascade'
81 })
74} 82}
75 83
76findOrCreateAuthor = function (name: string, podId: number, userId: number, transaction: Sequelize.Transaction) { 84findOrCreateAuthor = function (name: string, podId: number, userId: number, transaction: Sequelize.Transaction) {