From 2e3a13d42107b256302cb9c9d5c6eac06e3a995e Mon Sep 17 00:00:00 2001 From: marcos-silva-rodrigues Date: Thu, 19 Mar 2026 14:35:14 -0300 Subject: [PATCH] FIX: send correct name and email from user payload --- src/modules/auth/auth.controller.ts | 1 + src/modules/auth/auth.service.ts | 3 ++- src/modules/auth/dtos/login.ts | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/auth/auth.controller.ts b/src/modules/auth/auth.controller.ts index 385d60c..dbff860 100644 --- a/src/modules/auth/auth.controller.ts +++ b/src/modules/auth/auth.controller.ts @@ -488,6 +488,7 @@ export class AuthController { const userDto = { id: api_key.user_id, name: api_key.username, + email: api_key.username, customer: { id: api_key.customer_id, name: api_key.customer_name, diff --git a/src/modules/auth/auth.service.ts b/src/modules/auth/auth.service.ts index 6d67b95..8539d0e 100644 --- a/src/modules/auth/auth.service.ts +++ b/src/modules/auth/auth.service.ts @@ -437,7 +437,8 @@ export class AuthClientService implements OnModuleInit { const userDto: UserDTO = { id: user.id, - name: user.username, + name: user.name, + email: user.email, jobTitle: user?.jobTitle || null, department: user?.department || null, hierarchy: user?.hierarchy || null, diff --git a/src/modules/auth/dtos/login.ts b/src/modules/auth/dtos/login.ts index 3a484c8..2e22363 100644 --- a/src/modules/auth/dtos/login.ts +++ b/src/modules/auth/dtos/login.ts @@ -144,6 +144,7 @@ export interface BulkEditResponse { export type UserDTO = { id: string, name: string, + email: string, jobTitle?: string, department?: string, hierarchy?: string,