From ffd533e55167055ff3b291e3e92448a741546a80 Mon Sep 17 00:00:00 2001 From: MikeIsAStar <99037623+MikeIsAStar@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:55:30 -0400 Subject: [PATCH] RACE: Allow 'GetTopTenRankings' requests for competitions --- race/nintendo_racing_service.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/race/nintendo_racing_service.go b/race/nintendo_racing_service.go index ed81b74..d8e7002 100644 --- a/race/nintendo_racing_service.go +++ b/race/nintendo_racing_service.go @@ -90,12 +90,19 @@ func handleNintendoRacingServiceRequest(moduleName string, responseWriter http.R logging.Error(moduleName, "Invalid region id") return } - if !courseId.IsValid() { + if courseId < common.MarioCircuit { logging.Error(moduleName, "Invalid course id") return } - logging.Info(moduleName, "Received a request for the Top 10 of", aurora.BrightCyan(courseId.ToString())) + var topTenLeaderboard string + if courseId <= common.GBAShyGuyBeach { + topTenLeaderboard = courseId.ToString() + } else { + topTenLeaderboard = "a competition" + } + + logging.Info(moduleName, "Received a request for the Top 10 of", aurora.BrightCyan(topTenLeaderboard)) handleGetTopTenRankingsRequest(moduleName, responseWriter) } }