mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-09-08 00:25:30 -05:00
SAKE: Do not store ghost files for Mario Kart Wii competitions
This commit is contained in:
@@ -38,6 +38,7 @@ func handleMarioKartWiiFileUploadRequest(moduleName string, responseWriter http.
|
||||
scoreString := query.Get("score")
|
||||
pidString := query.Get("pid")
|
||||
playerInfo := query.Get("playerinfo")
|
||||
_, isContest := query["contest"]
|
||||
|
||||
regionIdInt, err := strconv.Atoi(regionIdString)
|
||||
if err != nil {
|
||||
@@ -132,6 +133,10 @@ func handleMarioKartWiiFileUploadRequest(moduleName string, responseWriter http.
|
||||
return
|
||||
}
|
||||
|
||||
if isContest {
|
||||
ghostFile = nil
|
||||
}
|
||||
|
||||
err = database.UploadMarioKartWiiGhostFile(pool, ctx, regionId, courseId, score, pid, playerInfo, ghostFile)
|
||||
if err != nil {
|
||||
logging.Error(moduleName, "Failed to insert the ghost file into the database")
|
||||
|
||||
Reference in New Issue
Block a user