From a6e7212d792eb6d62daca0498648571c7b1f602e Mon Sep 17 00:00:00 2001 From: Oleg Drozdovich Date: Tue, 13 Feb 2024 13:03:51 +0100 Subject: [PATCH] feat(users): update token clean up selection --- microservices/users/src/repositories/user.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/microservices/users/src/repositories/user.ts b/microservices/users/src/repositories/user.ts index 84cd6fc9..4acc2b64 100644 --- a/microservices/users/src/repositories/user.ts +++ b/microservices/users/src/repositories/user.ts @@ -111,7 +111,8 @@ class User extends Repository { const query = { where: { userId, - ...(tokenId ? { id: tokenId } : {}), + // Select all tokens that are not equal to provided + ...(tokenId ? { id: { '!=': tokenId } } : {}), }, };