diff options
Diffstat (limited to 'backend/handlers/user.go')
| -rw-r--r-- | backend/handlers/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/handlers/user.go b/backend/handlers/user.go index e975d07..d550862 100644 --- a/backend/handlers/user.go +++ b/backend/handlers/user.go | |||
| @@ -806,8 +806,8 @@ func UpdateUser(c *gin.Context) { | |||
| 806 | return | 806 | return |
| 807 | } | 807 | } |
| 808 | // Update profile | 808 | // Update profile |
| 809 | _, err = database.DB.Exec(`UPDATE users SET username = $1, avatar_link = $2, country_code = $3, updated_at = $4 | 809 | sql := `UPDATE users SET user_name = $1, avatar_link = $2, country_code = $3, updated_at = $4 WHERE steam_id = $5` |
| 810 | WHERE steam_id = $5`, profile.PersonaName, profile.AvatarFull, profile.LocCountryCode, time.Now().UTC(), user.(models.User).SteamID) | 810 | _, err = database.DB.Exec(sql, profile.PersonaName, profile.AvatarFull, profile.LocCountryCode, time.Now().UTC(), user.(models.User).SteamID) |
| 811 | if err != nil { | 811 | if err != nil { |
| 812 | CreateLog(user.(models.User).SteamID, LogTypeUser, LogDescriptionUserUpdateFail, "UPDATE#users: "+err.Error()) | 812 | CreateLog(user.(models.User).SteamID, LogTypeUser, LogDescriptionUserUpdateFail, "UPDATE#users: "+err.Error()) |
| 813 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) | 813 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) |