From 968b835d0e6fe960c3d7ab915ef6d9cecec4ab7f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 5 Aug 2024 02:33:54 +0900 Subject: feat(backend): allow to edit `game_type` in admin page --- backend/db/query.sql.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'backend/db/query.sql.go') diff --git a/backend/db/query.sql.go b/backend/db/query.sql.go index 464d7f8..c574ca8 100644 --- a/backend/db/query.sql.go +++ b/backend/db/query.sql.go @@ -251,16 +251,18 @@ func (q *Queries) ListUsers(ctx context.Context) ([]User, error) { const updateGame = `-- name: UpdateGame :exec UPDATE games SET - state = $2, - display_name = $3, - duration_seconds = $4, - started_at = $5, - problem_id = $6 + game_type = $2, + state = $3, + display_name = $4, + duration_seconds = $5, + started_at = $6, + problem_id = $7 WHERE game_id = $1 ` type UpdateGameParams struct { GameID int32 + GameType string State string DisplayName string DurationSeconds int32 @@ -271,6 +273,7 @@ type UpdateGameParams struct { func (q *Queries) UpdateGame(ctx context.Context, arg UpdateGameParams) error { _, err := q.db.Exec(ctx, updateGame, arg.GameID, + arg.GameType, arg.State, arg.DisplayName, arg.DurationSeconds, -- cgit v1.2.3-70-g09d2