add times to get game

This commit is contained in:
2026-08-04 01:23:01 +07:00
parent ae3a8c809f
commit f3ac19ed83
9 changed files with 159 additions and 104 deletions
+5 -1
View File
@@ -62,7 +62,9 @@ func (r *GamesRepo) GetGameByID(
games.description,
games.start_at,
games.status,
games.scenario_id
games.scenario_id,
games.started_at,
games.ended_at
FROM games
WHERE id = $1`,
id,
@@ -74,6 +76,8 @@ func (r *GamesRepo) GetGameByID(
&game.StartAt,
&game.Status,
&game.ScenarioId,
game.StartedAt,
game.EndedAt,
)
if err != nil {
if errors.Is(err, pgx.ErrNoRows) {