feat(auth): fix change password error message #107

Merged
tim merged 1 commits from fix-change-password into prod 2025-05-18 16:32:47 +00:00
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>