Fixes
This commit is contained in:
@@ -88,6 +88,13 @@ Location.hasMany(Match, { foreignKey: 'locationId', as: 'matches' });
|
||||
User.belongsToMany(Club, { through: UserClub, foreignKey: 'userId' });
|
||||
Club.belongsToMany(User, { through: UserClub, foreignKey: 'clubId' });
|
||||
|
||||
UserClub.belongsTo(User, { foreignKey: 'userId', as: 'user' });
|
||||
User.hasMany(UserClub, { foreignKey: 'userId' });
|
||||
|
||||
UserClub.belongsTo(Club, { foreignKey: 'clubId', as: 'club' });
|
||||
Club.hasMany(UserClub, { foreignKey: 'clubId' });
|
||||
|
||||
|
||||
export {
|
||||
User,
|
||||
Log,
|
||||
|
||||
@@ -104,6 +104,7 @@ class ClubService {
|
||||
include: [
|
||||
{
|
||||
model: User,
|
||||
as: 'user',
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user