From 2b333c43bb15c086edd6eea154b63db2d24f9fdf Mon Sep 17 00:00:00 2001 From: Torsten Schulz Date: Wed, 25 Sep 2024 18:01:40 +0200 Subject: [PATCH] Fixed userId --- backend/models/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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,