aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/api/handlers.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-05 02:27:53 +0900
committernsfisis <nsfisis@gmail.com>2024-08-05 03:02:18 +0900
commit5988360d8cf0fc0028c6db1c82afc1e313ba0513 (patch)
tree08b9e5126ff2256c64e097c5bfb1024278e33981 /backend/api/handlers.go
parent2705f09f5c52b25af07a1d7ccec546de68ff32e9 (diff)
downloadiosdc-japan-2025-albatross-5988360d8cf0fc0028c6db1c82afc1e313ba0513.tar.gz
iosdc-japan-2025-albatross-5988360d8cf0fc0028c6db1c82afc1e313ba0513.tar.zst
iosdc-japan-2025-albatross-5988360d8cf0fc0028c6db1c82afc1e313ba0513.zip
feat(backend): return `game_type` in API response
Diffstat (limited to 'backend/api/handlers.go')
-rw-r--r--backend/api/handlers.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/api/handlers.go b/backend/api/handlers.go
index a824f17..659e5c1 100644
--- a/backend/api/handlers.go
+++ b/backend/api/handlers.go
@@ -87,6 +87,7 @@ func (h *ApiHandler) GetGames(ctx context.Context, request GetGamesRequestObject
}
games[i] = Game{
GameID: int(row.GameID),
+ GameType: GameGameType(row.GameType),
State: GameState(row.State),
DisplayName: row.DisplayName,
DurationSeconds: int(row.DurationSeconds),
@@ -134,6 +135,7 @@ func (h *ApiHandler) GetGame(ctx context.Context, request GetGameRequestObject,
}
game := Game{
GameID: int(row.GameID),
+ GameType: GameGameType(row.GameType),
State: GameState(row.State),
DisplayName: row.DisplayName,
DurationSeconds: int(row.DurationSeconds),