feat(auth): fix change password error message
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 4m27s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 4m45s

This commit was merged in pull request #107.
This commit is contained in:
2025-05-18 18:28:11 +02:00
parent 36e480f2ea
commit b3b840982c
2 changed files with 4 additions and 4 deletions

View File

@@ -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
}

View File

@@ -14,7 +14,7 @@ templ ChangePasswordComp(isPasswordReset bool) {
Change Password
</h2>
if !isPasswordReset {
<label class="input input-bordered flex items-center gap-2">
<label class="input flex items-center gap-2">
<input
type="password"
class="grow"
@@ -27,7 +27,7 @@ templ ChangePasswordComp(isPasswordReset bool) {
/>
</label>
}
<label class="input input-bordered flex items-center gap-2">
<label class="input flex items-center gap-2">
<input
type="password"
class="grow"
@@ -39,7 +39,7 @@ templ ChangePasswordComp(isPasswordReset bool) {
autocapitalize="off"
/>
</label>
<button class="btn btn-primary self-end">
<button class="button button-primary px-2 self-end">
Change Password
</button>
</form>