handling closing posts
This commit is contained in:
@@ -35,6 +35,7 @@ Message.belongsTo(Message, {
|
||||
// Forum associations
|
||||
User.hasMany(ForumPost, { as: "forumPosts", foreignKey: "authorId" });
|
||||
ForumPost.belongsTo(User, { as: "author", foreignKey: "authorId" });
|
||||
ForumPost.belongsTo(User, { as: "closer", foreignKey: "closedBy" });
|
||||
|
||||
User.hasMany(ForumComment, { as: "forumComments", foreignKey: "authorId" });
|
||||
ForumComment.belongsTo(User, { as: "author", foreignKey: "authorId" });
|
||||
|
||||
Reference in New Issue
Block a user