aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-11-07 11:47:01 +0300
committerGitHub <noreply@github.com>2023-11-07 11:47:01 +0300
commit04778cfb4dcf8543479c11db381092ccd237b7f8 (patch)
treee9d2cbd990e4223a4d8d77e517193aacea21fd32
parentfix: getplayersummaries cant unmarshal when player is in game (#131) (diff)
downloadlphub-04778cfb4dcf8543479c11db381092ccd237b7f8.tar.gz
lphub-04778cfb4dcf8543479c11db381092ccd237b7f8.tar.bz2
lphub-04778cfb4dcf8543479c11db381092ccd237b7f8.zip
feat: error check on 0 portal 0 tick record (#133)
-rw-r--r--backend/handlers/record.go6
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