From b28ee472c50508ead2e6af5122f2156cca92515d Mon Sep 17 00:00:00 2001 From: Schalli Date: Mon, 29 Jun 2026 16:02:38 +0200 Subject: [PATCH] fix(api): use user.id instead of user.sub in changePassword controller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JWT strategy maps payload.sub to user.id — user.sub was always undefined, causing Prisma findUnique to fail with id: undefined validation error. Co-Authored-By: Claude Sonnet 4.6 --- apps/api/src/auth/auth.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/auth/auth.controller.ts b/apps/api/src/auth/auth.controller.ts index 50a1340..dd82654 100644 --- a/apps/api/src/auth/auth.controller.ts +++ b/apps/api/src/auth/auth.controller.ts @@ -99,7 +99,7 @@ export class AuthController { @Body() dto: ChangePasswordDto, ) { await this.authService.changePassword( - user.sub, + user.id, dto.currentPassword, dto.newPassword, );