From 053f2d0b5626d419a1441d42c085b6f2238cfab9 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Sun, 28 Jun 2026 17:38:10 -0500 Subject: [PATCH] Fix pro_state field name mismatch in /auth/me response Flutter reads 'professional_state' but Prisma returns 'pro_state'. Add professional_state alias in me() response so proState is read correctly. Co-Authored-By: Claude Sonnet 4.6 --- backend/src/auth/auth.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/auth/auth.service.ts b/backend/src/auth/auth.service.ts index 80df0b3..1790baf 100644 --- a/backend/src/auth/auth.service.ts +++ b/backend/src/auth/auth.service.ts @@ -104,7 +104,7 @@ export class AuthService { }, }); if (!user) throw new UnauthorizedException('Usuario no encontrado'); - return user; + return { ...user, professional_state: user.pro_state }; } async getProfessionalId(userId: string): Promise {