diff options
| -rw-r--r-- | backend/handlers/record.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/handlers/record.go b/backend/handlers/record.go index 697cd40..5dff085 100644 --- a/backend/handlers/record.go +++ b/backend/handlers/record.go | |||
| @@ -134,6 +134,12 @@ func CreateRecordWithDemo(c *gin.Context) { | |||
| 134 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) | 134 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) |
| 135 | return | 135 | return |
| 136 | } | 136 | } |
| 137 | if hostDemoScoreCount == 0 && hostDemoScoreTime == 0 { | ||
| 138 | deleteFile(srv, file.Id) | ||
| 139 | CreateLog(user.(models.User).SteamID, LogTypeRecord, LogDescriptionCreateRecordProcessDemoFail, err.Error()) | ||
| 140 | c.JSON(http.StatusOK, models.ErrorResponse("Processing demo went wrong. Please contact a web admin and provide the demo in question.")) | ||
| 141 | return | ||
| 142 | } | ||
| 137 | if i == 0 { | 143 | if i == 0 { |
| 138 | hostDemoFileID = file.Id | 144 | hostDemoFileID = file.Id |
| 139 | hostDemoUUID = uuid | 145 | hostDemoUUID = uuid |