aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/user.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/user.js')
-rw-r--r--server/models/user.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/models/user.js b/server/models/user.js
index 631cd96c9..36ed723cc 100644
--- a/server/models/user.js
+++ b/server/models/user.js
@@ -94,6 +94,11 @@ function toFormatedJSON () {
94// ------------------------------ STATICS ------------------------------ 94// ------------------------------ STATICS ------------------------------
95 95
96function associate (models) { 96function associate (models) {
97 this.hasOne(models.Author, {
98 foreignKey: 'userId',
99 onDelete: 'cascade'
100 })
101
97 this.hasMany(models.OAuthToken, { 102 this.hasMany(models.OAuthToken, {
98 foreignKey: 'userId', 103 foreignKey: 'userId',
99 onDelete: 'cascade' 104 onDelete: 'cascade'