diff --git a/backend/models/index.js b/backend/models/index.js index e4363d0..eaf5346 100644 --- a/backend/models/index.js +++ b/backend/models/index.js @@ -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.belongsTo(UserClub, { foreignKey: 'userClub', as: 'clubUser' }); -UserClub.hasMany(User, { foreignKey: 'userClub', as: 'userClub' }); +User.belongsTo(UserClub, { foreignKey: 'userId', as: 'clubUser' }); +UserClub.hasMany(User, { foreignKey: 'userId', as: 'userClub' }); export { User, Log,