diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-10-22 11:31:03 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-10-22 11:31:03 +0300 |
| commit | ae360114069da9ef567551dede7196d7831049c1 (patch) | |
| tree | 6263972f233da08d665721b6b7d2de9e4ac0a784 /backend/handlers/record.go | |
| parent | xdd (diff) | |
| download | lphub-ae360114069da9ef567551dede7196d7831049c1.tar.gz lphub-ae360114069da9ef567551dede7196d7831049c1.tar.bz2 lphub-ae360114069da9ef567551dede7196d7831049c1.zip | |
backend: importance of || and &&
Diffstat (limited to '')
| -rw-r--r-- | backend/handlers/record.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/handlers/record.go b/backend/handlers/record.go index c720823..e43cc61 100644 --- a/backend/handlers/record.go +++ b/backend/handlers/record.go | |||
| @@ -204,7 +204,7 @@ func CreateRecordWithDemo(c *gin.Context) { | |||
| 204 | // c.JSON(http.StatusOK, models.ErrorResponse(fmt.Sprintf("Partner SteamID from demo and request does not match! Check your submission and try again.\nDemo Partner SteamID: %s\nRequest Partner SteamID: %s", convertedPartnerSteamID, record.PartnerID))) | 204 | // c.JSON(http.StatusOK, models.ErrorResponse(fmt.Sprintf("Partner SteamID from demo and request does not match! Check your submission and try again.\nDemo Partner SteamID: %s\nRequest Partner SteamID: %s", convertedPartnerSteamID, record.PartnerID))) |
| 205 | // return | 205 | // return |
| 206 | // } | 206 | // } |
| 207 | if convertedHostSteamID != user.(models.User).SteamID || convertedPartnerSteamID != user.(models.User).SteamID { | 207 | if convertedHostSteamID != user.(models.User).SteamID && convertedPartnerSteamID != user.(models.User).SteamID { |
| 208 | deleteFile(srv, hostDemoFileID) | 208 | deleteFile(srv, hostDemoFileID) |
| 209 | deleteFile(srv, partnerDemoFileID) | 209 | deleteFile(srv, partnerDemoFileID) |
| 210 | c.JSON(http.StatusOK, models.ErrorResponse("You are permitted to only upload your own runs!")) | 210 | c.JSON(http.StatusOK, models.ErrorResponse("You are permitted to only upload your own runs!")) |