Skip to content

Commit

Permalink
fix(team_fetch): correctly detect if the user is not part of the team…
Browse files Browse the repository at this point in the history
… anymore before fetch (#1273)
  • Loading branch information
LaurentMag authored Jan 31, 2024
1 parent 59ce0f2 commit 5c53bd9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions yaki_backend/src/features/team/team.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ export class TeamRepository {
port: Number(process.env.DB_PORT),
});
const query = `
SELECT t.team_id, t.team_name, t.team_actif_flag
FROM public.teammate tm
INNER JOIN public.team t
ON t.team_id = tm.teammate_team_id
WHERE tm.teammate_user_id = $1
AND t.team_actif_flag = true;
SELECT t.team_id, t.team_name, t.team_actif_flag
FROM public.teammate tm
INNER JOIN public.team t
ON t.team_id = tm.teammate_team_id
WHERE tm.teammate_user_id = $1
AND t.team_actif_flag = true
AND tm.teammate_actif_flag = true;
`;
client.connect();
try {
Expand Down

0 comments on commit 5c53bd9

Please sign in to comment.