diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-05 03:07:30 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-05 03:07:30 +0900 |
| commit | 9ff9c151e5defd9eed5cba3c88bc341b4360d09c (patch) | |
| tree | bf5b9e721274ffa58df66823d39f9ceadebc9f98 /backend/admin/handlers.go | |
| parent | ff959dadb1f990173b9df3105ccfc96b1c6c092e (diff) | |
| parent | 498ad23eaaae1e856c71f44ad0bf3912a6d7e5b7 (diff) | |
| download | phperkaigi-2025-albatross-9ff9c151e5defd9eed5cba3c88bc341b4360d09c.tar.gz phperkaigi-2025-albatross-9ff9c151e5defd9eed5cba3c88bc341b4360d09c.tar.zst phperkaigi-2025-albatross-9ff9c151e5defd9eed5cba3c88bc341b4360d09c.zip | |
Merge branch 'feat/multiplayer-mode'
Diffstat (limited to 'backend/admin/handlers.go')
| -rw-r--r-- | backend/admin/handlers.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/admin/handlers.go b/backend/admin/handlers.go index 14523e6..d9a6977 100644 --- a/backend/admin/handlers.go +++ b/backend/admin/handlers.go @@ -130,6 +130,7 @@ func (h *AdminHandler) getGames(c echo.Context) error { } games[i] = echo.Map{ "GameID": g.GameID, + "GameType": g.GameType, "State": g.State, "DisplayName": g.DisplayName, "DurationSeconds": g.DurationSeconds, @@ -167,6 +168,7 @@ func (h *AdminHandler) getGameEdit(c echo.Context) error { "Title": "Game Edit", "Game": echo.Map{ "GameID": row.GameID, + "GameType": row.GameType, "State": row.State, "DisplayName": row.DisplayName, "DurationSeconds": row.DurationSeconds, @@ -190,6 +192,7 @@ func (h *AdminHandler) postGameEdit(c echo.Context) error { } } + gameType := c.FormValue("game_type") state := c.FormValue("state") displayName := c.FormValue("display_name") durationSeconds, err := strconv.Atoi(c.FormValue("duration_seconds")) @@ -247,6 +250,7 @@ func (h *AdminHandler) postGameEdit(c echo.Context) error { err = h.q.UpdateGame(c.Request().Context(), db.UpdateGameParams{ GameID: int32(gameID), + GameType: gameType, State: state, DisplayName: displayName, DurationSeconds: int32(durationSeconds), |
