diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-24 11:46:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-24 11:46:57 +0300 |
| commit | ec2dc00f58948f21b8e59250f43810813e25ded3 (patch) | |
| tree | 5f75a54527bce307c257f178c2b8aa84eb675f46 /backend/handlers/record.go | |
| parent | feat: specify using proxy for steam auth (#57) (diff) | |
| download | lphub-ec2dc00f58948f21b8e59250f43810813e25ded3.tar.gz lphub-ec2dc00f58948f21b8e59250f43810813e25ded3.tar.bz2 lphub-ec2dc00f58948f21b8e59250f43810813e25ded3.zip | |
fix: delete demo if parsing goes wrong (#90)
Former-commit-id: 06af69e5cd5d190c7f221a8eef4b0134fe50ba3d
Diffstat (limited to 'backend/handlers/record.go')
| -rw-r--r-- | backend/handlers/record.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/backend/handlers/record.go b/backend/handlers/record.go index 70234c3..4787422 100644 --- a/backend/handlers/record.go +++ b/backend/handlers/record.go | |||
| @@ -129,6 +129,7 @@ func CreateRecordWithDemo(c *gin.Context) { | |||
| 129 | } | 129 | } |
| 130 | hostDemoScoreCount, hostDemoScoreTime, err = parser.ProcessDemo("backend/parser/" + uuid + ".dem") | 130 | hostDemoScoreCount, hostDemoScoreTime, err = parser.ProcessDemo("backend/parser/" + uuid + ".dem") |
| 131 | if err != nil { | 131 | if err != nil { |
| 132 | deleteFile(srv, file.Id) | ||
| 132 | CreateLog(user.(models.User).SteamID, LogTypeRecord, LogDescriptionRecordFailProcessDemo) | 133 | CreateLog(user.(models.User).SteamID, LogTypeRecord, LogDescriptionRecordFailProcessDemo) |
| 133 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) | 134 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) |
| 134 | return | 135 | return |