cleanup errors
alex wennerberg alex@alexwennerberg.com
Sun, 06 Dec 2020 11:21:32 -0800
1 files changed,
3 insertions(+),
2 deletions(-)
jump to
M
http.go
→
http.go
@@ -283,7 +283,8 @@ if newUsername != authUser {
// Rename User err = renameUser(authUser, newUsername) if err != nil { - errors = append(errors, err.Error()) + log.Println(err) + errors = append(errors, "Could not rename user") } else { session, _ := SessionStore.Get(r, "cookie-session") session.Values["auth_user"] = newUsername@@ -596,7 +597,7 @@ data.Error = "Password is too short"
} else { err = bcrypt.CompareHashAndPassword(currPass, []byte(enteredCurrPass)) if err == nil { - hashedPassword, err := bcrypt.GenerateFromPassword([]byte(password1), 8) // TODO handle error + hashedPassword, err := bcrypt.GenerateFromPassword([]byte(password1), 8) if err != nil { panic(err) }