This commit is contained in:
Torsten Schulz
2024-09-25 18:12:42 +02:00
parent fe149f29ba
commit f1a12e90f9
2 changed files with 2 additions and 3 deletions

View File

@@ -85,8 +85,8 @@ Season.hasMany(Match, { foreignKey: 'seasonId', as: 'matches' });
Match.belongsTo(Location, { foreignKey: 'locationId', as: 'location' });
Location.hasMany(Match, { foreignKey: 'locationId', as: 'matches' });
User.belongsToMany(Club, { through: UserClub, foreignKey: 'userId', otherKey: 'clubId' });
Club.belongsToMany(User, { through: UserClub, foreignKey: 'clubId', otherKey: 'userId' });
User.belongsToMany(Club, { through: UserClub, foreignKey: 'userId' });
Club.belongsToMany(User, { through: UserClub, foreignKey: 'clubId' });
export {
User,

View File

@@ -104,7 +104,6 @@ class ClubService {
include: [
{
model: User,
as: 'userClub',
}
]
});