Skip to content

Commit

Permalink
feat(users): update token clean up selection (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegDO authored Feb 13, 2024
1 parent 2bf0474 commit 56e1e12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion microservices/users/src/repositories/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ class User extends Repository<UserEntity> {
const query = {
where: {
userId,
...(tokenId ? { id: tokenId } : {}),
// Select all tokens that are not equal to provided
...(tokenId ? { id: { '!=': tokenId } } : {}),
},
};

Expand Down

0 comments on commit 56e1e12

Please sign in to comment.