aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/admin/handler.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-09-06 01:44:25 +0900
committernsfisis <nsfisis@gmail.com>2025-09-06 01:44:25 +0900
commit3e77bb9ee1aabab22138de9850d8bd434eda6d91 (patch)
treedfd7203a52eb85bbd49abbd6ec699e4e3f0484a8 /backend/admin/handler.go
parent9dbca8dde5b5c37f7bf54df49bb29413ded88cc8 (diff)
downloadiosdc-japan-2025-albatross-3e77bb9ee1aabab22138de9850d8bd434eda6d91.tar.gz
iosdc-japan-2025-albatross-3e77bb9ee1aabab22138de9850d8bd434eda6d91.tar.zst
iosdc-japan-2025-albatross-3e77bb9ee1aabab22138de9850d8bd434eda6d91.zip
feat(backend): update qualifying ranking page
Diffstat (limited to 'backend/admin/handler.go')
-rw-r--r--backend/admin/handler.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/admin/handler.go b/backend/admin/handler.go
index c045b7d..289a598 100644
--- a/backend/admin/handler.go
+++ b/backend/admin/handler.go
@@ -98,10 +98,15 @@ func (h *Handler) getOnlineQualifyingRanking(c echo.Context) error {
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, "Invalid game_2")
}
+ game3, err := strconv.Atoi(c.QueryParam("game_3"))
+ if err != nil {
+ return echo.NewHTTPError(http.StatusBadRequest, "Invalid game_3")
+ }
rows, err := h.q.GetQualifyingRanking(c.Request().Context(), db.GetQualifyingRankingParams{
GameID: int32(game1),
GameID_2: int32(game2),
+ GameID_3: int32(game3),
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, err.Error())
@@ -115,9 +120,11 @@ func (h *Handler) getOnlineQualifyingRanking(c echo.Context) error {
"UserLabel": r.UserLabel,
"Score1": r.CodeSize1,
"Score2": r.CodeSize2,
+ "Score3": r.CodeSize3,
"TotalScore": r.TotalCodeSize,
"SubmittedAt1": r.SubmittedAt1.Time.In(jst).Format("2006-01-02T15:04"),
"SubmittedAt2": r.SubmittedAt2.Time.In(jst).Format("2006-01-02T15:04"),
+ "SubmittedAt3": r.SubmittedAt3.Time.In(jst).Format("2006-01-02T15:04"),
}
}
return c.Render(http.StatusOK, "online_qualifying_ranking", echo.Map{