Skip to content

Commit abaeae1

Browse files
committed
fix in AddUserToTeams
1 parent 8571225 commit abaeae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/app/repository/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (r *userRepo) Create(ctx context.Context, user *models.User) error {
3939

4040
func (r *userRepo) AddUserToTeams(ctx context.Context, userId openapi_types.UUID, teamIds *[]openapi_types.UUID) error {
4141
for _, teamId := range *teamIds {
42-
_, err := r.db.ExecContext(ctx, "INSERT INTO profiles (user_id, team_id) VALUES ($1, $2)", userId, teamId)
42+
_, err := r.db.ExecContext(ctx, "INSERT INTO profiles (user_id, current_team_id) VALUES ($1, $2)", userId, teamId)
4343
if err != nil {
4444
return err
4545
}

0 commit comments

Comments
 (0)