From 84bca0d02692ddc8fb72596aaa0381418e312b5f Mon Sep 17 00:00:00 2001 From: Nguyen Hong Son Date: Fri, 3 Jul 2026 02:08:19 +0700 Subject: [PATCH] fix: user and role --- backend/src/core/modules/auth/auth.repository.js | 4 ---- backend/src/core/modules/auth/service/auth.service.js | 2 -- 2 files changed, 6 deletions(-) diff --git a/backend/src/core/modules/auth/auth.repository.js b/backend/src/core/modules/auth/auth.repository.js index 3ad754b..1df2139 100644 --- a/backend/src/core/modules/auth/auth.repository.js +++ b/backend/src/core/modules/auth/auth.repository.js @@ -17,10 +17,6 @@ const PROFILE_SELECT = { banned_by: true, is_email_confirmed: true, created_at: true, - status: true, - roles: { - select: { name: true } - } }; diff --git a/backend/src/core/modules/auth/service/auth.service.js b/backend/src/core/modules/auth/service/auth.service.js index acc3660..fb44310 100644 --- a/backend/src/core/modules/auth/service/auth.service.js +++ b/backend/src/core/modules/auth/service/auth.service.js @@ -338,8 +338,6 @@ class Service { ? { planName: user.subscriptions.plan_name ?? null } : undefined, createdAt: user.created_at ?? undefined, - status: user.status ?? 'ACTIVE', - roleName: user.roles?.name || (Array.isArray(user.roles) ? user.roles[0]?.name : null) || 'USER' }; }