From bf2551b0f613e1fe2186c88c011ec3da80eb29fc Mon Sep 17 00:00:00 2001 From: 190km Date: Fri, 20 Dec 2024 00:54:32 +0100 Subject: [PATCH] fix(settings/profile): fixed password changing --- apps/dokploy/server/api/routers/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/server/api/routers/auth.ts b/apps/dokploy/server/api/routers/auth.ts index ef9db4da2..cad77927c 100644 --- a/apps/dokploy/server/api/routers/auth.ts +++ b/apps/dokploy/server/api/routers/auth.ts @@ -188,9 +188,9 @@ export const authRouter = createTRPCRouter({ .mutation(async ({ ctx, input }) => { const currentAuth = await findAuthByEmail(ctx.user.email); - if (input.password) { + if (input.currentPassword) { const correctPassword = bcrypt.compareSync( - input.password, + input.currentPassword, currentAuth?.password || "", ); if (!correctPassword) {