Move some logging statements for more consistency

This commit is contained in:
eikendev 2020-08-06 00:29:14 +02:00
parent 34abda1ede
commit b89deeac3d
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
2 changed files with 6 additions and 6 deletions

View file

@ -84,6 +84,8 @@ func (h *UserHandler) updateUser(ctx *gin.Context, u *model.User, updateUser mod
}
}
log.Printf("Updating user %s.\n", u.Name)
if updateUser.Name != nil {
u.Name = *updateUser.Name
}
@ -211,8 +213,6 @@ func (h *UserHandler) UpdateUser(ctx *gin.Context) {
}
}
log.Printf("Updating user %s.\n", user.Name)
if err := h.updateUser(ctx, user, updateUser); err != nil {
return
}