Fix getting current user when updating avatar or user name

This commit is contained in:
kolaente 2020-11-21 22:02:49 +01:00
parent d1c65935e6
commit ae6144c042
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -55,7 +55,7 @@ func GetUserAvatarProvider(c echo.Context) error {
return handler.HandleHTTPError(err, c) return handler.HandleHTTPError(err, c)
} }
user, err := user2.GetUserWithEmail(u) user, err := user2.GetUserWithEmail(&user2.User{ID: u.ID})
if err != nil { if err != nil {
return handler.HandleHTTPError(err, c) return handler.HandleHTTPError(err, c)
} }
@ -89,7 +89,7 @@ func ChangeUserAvatarProvider(c echo.Context) error {
return handler.HandleHTTPError(err, c) return handler.HandleHTTPError(err, c)
} }
user, err := user2.GetUserWithEmail(u) user, err := user2.GetUserWithEmail(&user2.User{ID: u.ID})
if err != nil { if err != nil {
return handler.HandleHTTPError(err, c) return handler.HandleHTTPError(err, c)
} }
@ -128,7 +128,7 @@ func UpdateUserName(c echo.Context) error {
return handler.HandleHTTPError(err, c) return handler.HandleHTTPError(err, c)
} }
user, err := user2.GetUserWithEmail(u) user, err := user2.GetUserWithEmail(&user2.User{ID: u.ID})
if err != nil { if err != nil {
return handler.HandleHTTPError(err, c) return handler.HandleHTTPError(err, c)
} }