Fix getting current user when updating avatar or user name
This commit is contained in:
parent
d1c65935e6
commit
ae6144c042
1 changed files with 3 additions and 3 deletions
|
@ -55,7 +55,7 @@ func GetUserAvatarProvider(c echo.Context) error {
|
|||
return handler.HandleHTTPError(err, c)
|
||||
}
|
||||
|
||||
user, err := user2.GetUserWithEmail(u)
|
||||
user, err := user2.GetUserWithEmail(&user2.User{ID: u.ID})
|
||||
if err != nil {
|
||||
return handler.HandleHTTPError(err, c)
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ func ChangeUserAvatarProvider(c echo.Context) error {
|
|||
return handler.HandleHTTPError(err, c)
|
||||
}
|
||||
|
||||
user, err := user2.GetUserWithEmail(u)
|
||||
user, err := user2.GetUserWithEmail(&user2.User{ID: u.ID})
|
||||
if err != nil {
|
||||
return handler.HandleHTTPError(err, c)
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ func UpdateUserName(c echo.Context) error {
|
|||
return handler.HandleHTTPError(err, c)
|
||||
}
|
||||
|
||||
user, err := user2.GetUserWithEmail(u)
|
||||
user, err := user2.GetUserWithEmail(&user2.User{ID: u.ID})
|
||||
if err != nil {
|
||||
return handler.HandleHTTPError(err, c)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue