feat(auth): fix change password error message
This commit was merged in pull request #107.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user