From b3b840982cf4f55b9cd8a21ceba9a1408b11bc82 Mon Sep 17 00:00:00 2001 From: Tim Wundenberg Date: Sun, 18 May 2025 18:28:11 +0200 Subject: [PATCH] feat(auth): fix change password error message --- handler/auth.go | 2 +- template/auth/change_password.templ | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/handler/auth.go b/handler/auth.go index ca0f9e1..e656671 100644 --- a/handler/auth.go +++ b/handler/auth.go @@ -316,7 +316,7 @@ func (handler AuthImpl) handleChangePasswordComp() http.HandlerFunc { err := handler.service.ChangePassword(user, session.Id, currPass, newPass) if err != nil { - utils.TriggerToastWithStatus(w, r, "error", "Password not correct", http.StatusBadRequest) + utils.TriggerToastWithStatus(w, r, "error", err.Error(), http.StatusBadRequest) return } diff --git a/template/auth/change_password.templ b/template/auth/change_password.templ index eeacbff..9e761fb 100644 --- a/template/auth/change_password.templ +++ b/template/auth/change_password.templ @@ -14,7 +14,7 @@ templ ChangePasswordComp(isPasswordReset bool) { Change Password if !isPasswordReset { -