diff options
Diffstat (limited to '')
| -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 1b20af0..461e521 100644 --- a/backend/handlers/user.go +++ b/backend/handlers/user.go | |||
| @@ -800,7 +800,7 @@ func UpdateUser(c *gin.Context) { | |||
| 800 | } | 800 | } |
| 801 | profile, err := GetPlayerSummaries(user.(models.User).SteamID, os.Getenv("API_KEY")) | 801 | profile, err := GetPlayerSummaries(user.(models.User).SteamID, os.Getenv("API_KEY")) |
| 802 | if err != nil { | 802 | if err != nil { |
| 803 | CreateLog(user.(models.User).SteamID, LogTypeUser, LogDescriptionUserUpdateSummaryFail) | 803 | CreateLog(user.(models.User).SteamID, LogTypeUser, LogDescriptionUserUpdateSummaryFail, err.Error()) |
| 804 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) | 804 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) |
| 805 | return | 805 | return |
| 806 | } | 806 | } |
| @@ -808,7 +808,7 @@ func UpdateUser(c *gin.Context) { | |||
| 808 | _, err = database.DB.Exec(`UPDATE users SET username = $1, avatar_link = $2, country_code = $3, updated_at = $4 | 808 | _, err = database.DB.Exec(`UPDATE users SET username = $1, avatar_link = $2, country_code = $3, updated_at = $4 |
| 809 | WHERE steam_id = $5`, profile.PersonaName, profile.AvatarFull, profile.LocCountryCode, time.Now().UTC(), user.(models.User).SteamID) | 809 | WHERE steam_id = $5`, profile.PersonaName, profile.AvatarFull, profile.LocCountryCode, time.Now().UTC(), user.(models.User).SteamID) |
| 810 | if err != nil { | 810 | if err != nil { |
| 811 | CreateLog(user.(models.User).SteamID, LogTypeUser, LogDescriptionUserUpdateFail) | 811 | CreateLog(user.(models.User).SteamID, LogTypeUser, LogDescriptionUserUpdateFail, "U#users: "+err.Error()) |
| 812 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) | 812 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) |
| 813 | return | 813 | return |
| 814 | } | 814 | } |