generated from VLADIMIR/template
add times to get game
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user